Author Topic: replace in files match substitution  (Read 3608 times)

Offline mingkoonkat

  • Multiple posting newcomer
  • *
  • Posts: 16
replace in files match substitution
« on: December 04, 2013, 02:47:12 am »

I don't know if match substitution in the replace-in-files replace string is implemented? For example, it would be nice if the \2 in the replace with string was a substitution of the alpha numeric stuff matched in the ARE search string. Its fully possible that I just don't understand how to use it, but maybe the correct syntax for the \2 match substitution reference part is hard to deduce from WxWidgets ARE document since it doesn't address the syntax of a replace string?

Text to search for:
HandleToPtrInterface\s*<[\s[:alnum:]]*[[.greater-than-sign.]]

Replace with:
HdlIntf < \2 > :: Indirect

Thanks

Offline mingkoonkat

  • Multiple posting newcomer
  • *
  • Posts: 16
Re: replace in files match substitution
« Reply #1 on: December 04, 2013, 03:00:21 am »
I figured out how to do it; one must add parenthesis tagging a group that is to be substituted.

Search for:
HandleToPtrInterface\s*<([\s[:alnum:]]*)[[.greater-than-sign.]]

Replace with:
HdlIntf < \1 > :: Indirect