Regex Replace with uppercase
I'm trying to do a regex search and replace where the replace changes the case of one of the parts.
So I have:
foo_bar
foo_baz
And I want:
fooBar
fooBaz
My search:
(foo)_(.)
My replace:
$1$2
Is there a way to transform $2 to uppercase during the replace?
Thanks,
Neil
Please sign in to leave a comment.
Hi there,
http://youtrack.jetbrains.com/issue/IDEA-70451
The issue above was implemented! You can transform $2 to uppercase by surrounding it with replacement syntax (reference):
The \E is only needed if you have other text after $2 that you don't want uppercased.