Reputation: 621
I am searching across files in vscode
using the following regex expression
(?<=[a-zA-Z])_([a-zA-Z])
with $1
to replace Some_Random_Text
with SomeRandomText
but vs code repeats the backreference value if they are on the same line as shown below S
is repeated:
Upvotes: 0
Views: 233
Reputation: 181359
That sure looks like a bug to me. It does not happen in the Find in the current file widget. You should file an issue on this - probably due to the Search across files handling the lookbehind (which should be no problem since it is fixed-width).
In the meantime, you can easily remove the lookbehind part and use:
find: ([a-zA-Z])_([a-zA-Z])
replace: $1$2
which works as it should.
Upvotes: 1