Reputation: 3586
I want to replace for example F(G(X,Y)); with H(X,Y); In RAD Studio IDE.
The regex I use is:
Find Expression: F\(G\((.+)\)\);
Replace Expression: H($1)
The result is not as I expect:
Result: H($1)
It seems the RAD Studio does not recognize the $1 as the contents between two parentheses.
Anybody have an idea?
Thanks
Upvotes: 9
Views: 4337
Reputation: 1768
Use {} to group the expression rather than () and \1 in the replacement text:
Find Expression: F\(G\({.+}\)\)
; Replace Expression: H(\0)
Upvotes: 17