remove empty lines visual studio 2019 code example
Example 1: remove empty lines visual studio
^(?([^\r\n])\s)*\r?$\r?\n
Example 2: how to Remove redundant empty line. [API]csharp(RCS1036) vs code
Open your code in Visual Studio Code
From Edit Menu, select Replace or use a short cut key (command + Option + F on Mac or Ctrl + H on Windows)
In the find box type ^(\s)*$\n
Leave the replace box empty
Make sure the 'Use Regular Expression' is selected
Select 'Replace All' button
Example 3: remove empty lines visual studio
in find replace add ^(?([^\r\n])\s)*\r?$\r?\n with regex enabled