Regular Expression Replacing string

Top  Previous  Next

When using regular expressions to search for a pattern, the replacement string will be scanned for the $ character. Use the \$ escape to enter a $ character in the replacement string.

 

$0

The complete pattern found

$nn

The sub expression <nn> found.

 

To enter a digit after a $ that is not part of the sub expression number, enclose the digit in curly braces, like

$1{2} to refer the sub expression 1 followed by the digit 2.