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

Regex in VSCode: case conversion in output

$
0
0

I'm trying to replace a structure like this:

testVars.bread.componentFlour
testVars.bread.componentWater

to something like this:

testVars.dough.flour
testVars.dough.water

this happens with multiple variable names; I want to remove the component and have the first letter converted to lowercase to match CamelCase.

What I tried doing was matching testVars.bread.component(.) replacing it with testVars.dough.\l$1.

According to regex documentation, that should convert my match to lowercase. However, VSCode wants to insert \l as text.

How do I get VSCode to convert my match to lowercase?

EDIT: To clarify, this is strictly for VSCode's implementation, not a regex question itself. Matching this group in notepad++ and replacing with testVars.dough.\l\1 does exactly what I want it to do.


Viewing all articles
Browse latest Browse all 97371

Trending Articles



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