Skip to content

Multiline Regex in Visual Studio Code

January 6th, 2017 - IT

Setting up a multi-line regular expression in VS code is done by explicitly matching the CR/LF characters using \r?\n.

For example, if I want to find all lines starting with a [, including subsequent blank lines, I can do:

^\[.*(\r?\n\s*)*

HTH,

Share on
Reddit
Linked in
Whatsapp

A little experiment: