Conditional Regex in Replace not working?
Posted: Mon Jun 16, 2014 6:15 pm
I'm trying to use a conditional regular expression in the Replace part of the Find/Replace dialog. I can't get it to work--it returns string literals rather than evaluating the condition. I'm using 15.1, which I understood from the documentation supports Perl 5 regex, so I'm not sure what I'm missing.
For example,
Find:
Replace:
replaces all instances of "box" with the string "box(?(1)es)".
Any pointers would be much appreciated!
For example,
Find:
Code: Select all
(box)
Code: Select all
$1(?(1)es)
Any pointers would be much appreciated!