Find and replace with regex

General questions regarding the usage of CodeLite
User avatar
Jarod42
CodeLite Expert
Posts: 240
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Find and replace with regex

Post 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)
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Find and replace with regex

Post by eranif »

this sounds about right (using \1)
seems like a bug
Make sure you have read the HOW TO POST thread
Post Reply