Page 1 of 1

Find and replace with regex

Posted: Fri Sep 04, 2020 6:28 pm
by Jarod42
Whereas I found the checkbox to search using regex, replaced string doesn't seem to respect the flag

For example:
Replace

Code: Select all

range::foo\((.*)\)
by

Code: Select all

bar(begin(\1), end(\1))
with

Code: Select all

range::foo(var)
results in:

Code: Select all

bar(begin(\1), end(\1))
instead of expected

Code: Select all

bar(begin(var), end(var))
Should I use other token than \1 (for group1)? (I also tried with $1)

Re: Find and replace with regex

Posted: Thu Oct 01, 2020 2:59 pm
by eranif
this sounds about right (using \1)
seems like a bug