Visual Studio 2013 onwards (turn on ‘Use regular expressions’ in search and replace)
Remove single blank lines:
^\s*$\n
Remove double blank lines
^(?([^\r\n])\s)*\r?\n(?([^\r\n])\s)*\r?\n
SQL Server, performance, data, analytics
Visual Studio 2013 onwards (turn on ‘Use regular expressions’ in search and replace)
Remove single blank lines:
^\s*$\n
Remove double blank lines
^(?([^\r\n])\s)*\r?\n(?([^\r\n])\s)*\r?\n