Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading