Visual Studio has ability to delete empty lines in replace operation using regular expressions.
1.Click Ctrl-G
2. Tick "Use Regular Expressions"
3. In Find specify ^$\n
4. In Replace box delete everything.
5 Click "Replace All"
All empty lines will be deleted.
Regular expression for empty line consist of
|
Beginning of line
|
^
|
|
|
End of line
|
$
|
Note that normally in Windows an end of line indicated by 2 characters
CRLF - Carriage Return (
CR,
ASCII 13, \r) Line Feed (
LF,
ASCII 10, \n).
posted @ Tuesday, March 04, 2008 4:28 PM