Groups -- enclosed in \parentheses -- \(...\)
Alternatives -- \pipe -- \|
Back references -- \1...\9
Find:
| Setup\(Menu\|Styles\)
Change to:
| Update\1Always
| |
Good results
Found
Potential pitfall
Found SetupMenu
This example matches
foo(parameter1,parameter2) and changes the parameter order. Nonprinting characters are not taken into account, nor are nested parentheses considered.Find:
| <foo(\([^,]+\), \([^,]+\)
Change to:
| foo(\2,\1)
| |
Good results
Found foo(a,b) and changed to foo(b,a)
Found foo(int a,char* b) and changed to foo(char* b,int a)
Potential pitfall
Found foo(f(x,y)