- Published on
Regex replacement in VSCode
Suppose you have many function documentations reading
Module.foo
is a function that does "foo".
and you'd like to trim it down to only
Does "foo".
A way to do so in VSCode, is to insert the following into the Find input
[a-zA-z/_0-9.]+ is a function that (.*) // highlight-line
# c
and the following into the Replace input, where \u
upcases the captured $1
.
\u$1