Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97371

vs code can't replace using regex group references under PCRE2 mode

$
0
0

I'm trying to replace my std stl usage to EASTL and since i have a lot of cpp/h files, i'm relying in 'Search in Files' option of vs-code, with the following pattern:

((?<=#include \<)([^\/(.h)]+?)(?=\>))

This matches completely fine in regexr.com, in both match and replace and in vs code as well but needs the option of PCRE2 engine being enabled due backreferences use.

Trying to reference the matching group #1 using $1 under Search sidebar view simply doesn't work, and just adds "$1".

enter image description here

But if i search & replace with the same input for each file manually, it works as intended.

enter image description here

Thanks.


Viewing all articles
Browse latest Browse all 97371

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>