\1 in replace will take the place of whatever regular expression was first in find.
Example
Find
Chapter (.+?)
Replace
-CHAPTER \1-
Will give you -CHAPTER 1- replacing Chapter 1, -CHAPTER 2- replacing Chapter 2 and so on. What it gives you depends on the regular expression. If it is ([a-z]) it will give you a lower case letter. If it is ([0-9]) it will give you a single number.
You can have a series of them and so the second expressions capture would be output by \2.
You don't have to use what is found, so you can just use \2 without \1.
|