visual-studio-coderegexp-replace

How can I prevent interpretation of \u in the replace string


I want to search for \u00FC and replace it with \u00fc

My search regex is: \u([0-9A-F][0-9A-F][0-9A-F][0-9A-F]) and works fine

The replacement \L$1 does lowercase my 4 characters

However, I cannot find a way to write \u (I think vscode wants it to mean uppercase)

enter image description here


Solution

  • It works by using a positive look behind:

    In search bar:

    Search: (?<=\\u)((?:[0-9A-F]{4}))

    Replace: \L$1


    The \\u\L$1 works in the Find Replace dialog (Ctrl+F)

    You can file a bug in the VSC repo