There don't seem to be any replies to this question -- was it ever answered? Is it possible to reference a matched group in a replace using regular expressions?
for example:
Find: before(a-ZA-Z]+)
Replace: \1after
would change text: beforeToday to Todayafter
Is there a way to do this kind of thing or do I need an external tool like Perl?
There don't seem to be any replies to this question -- was it ever answered? Is it possible to reference a matched group in a replace using regular expressions?
for example:
Find: before(a-ZA-Z]+)
Replace: \1after
would change text: beforeToday to Todayafter
Is there a way to do this kind of thing or do I need an external tool like Perl?
There don't seem to be any replies to this question -- was it ever answered? Is it possible to reference a matched group in a replace using regular expressions?
for example:
Find: before(a-ZA-Z]+)
Replace: \1after
would change text: beforeToday
to Todayafter
Is there a way to do this kind of thing or do I need an external tool like Perl?
Charlie Evett wrote:
I requested this functionality in SCR #8075. You might want to vote for
it. See--
http://www.intellij.net/tracker/idea/viewSCR?publicId=8075
I sure hope they get to this and the variety of other requests filed
against find.
Jon
OK, I found my answer with more diligent searching. You have to use $1 as the match token in the replace rather than \1.
So
Find: before(+
Replace $1after
works.
Charlie Evett wrote:
Cool. I wonder when that changed. Could somebody at IntelliJ update the
SCR #8075 (if appropriate)?
Jon