Using back-references in wildcard searches
Back-references let you replace a selection with part of the wildcard string you entered in the Find text box. A back-reference consists of a backslash character followed by a number, for example "\1", "\2", and so on. The number refers to a subexpression (enclosed in parentheses) of the wildcard search pattern in the Find text box: When you click the Replace button, each selection is replaced with the part of the matching text that has been recognized by the subexpression that the back-reference refers to. For example, you enter the wildcard search pattern ((Adobe)?GoLive) in the Find text box to find any occurrence of "GoLive" or "GoLive". The "?" character makes the "Adobe" enclosed in the second pair of parentheses optional. If you enter the back-reference \1 6.0 in the Replace text box, the found text is replaced with the contents of the first pair of parentheses plus the number 6.0. If the match is "Adobe GoLive", the result is GoLive 6.0. If the match is "GoLive", the result is GoLive 6.0. |