Click here to Skip to main content
15,881,248 members
Articles / Web Development / ASP.NET
Alternative
Tip/Trick

Remove blank lines from code in Visual Studio

Rate me:
Please Sign up or sign in to vote.
4.77/5 (22 votes)
13 Oct 2010CPOL 21.7K   12   9
Remove all blank lines, containing or not spaces:^:b*$\n
Remove all blank lines, containing or not spaces:

^:b*$\n

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Spain Spain
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralMy vote of 1 Pin
Mohamed__Salah21-Feb-15 2:49
Mohamed__Salah21-Feb-15 2:49 
GeneralReason for my vote of 5 Great find. Its removing the blank l... Pin
Syed Shabeer25-Oct-11 2:03
Syed Shabeer25-Oct-11 2:03 
GeneralReason for my vote of 5 Everybody forgets about blanks in an... Pin
Harold Bamford24-Aug-11 13:03
Harold Bamford24-Aug-11 13:03 
GeneralReason for my vote of 5 Good one .. Pin
RedAsd27-Nov-10 21:44
RedAsd27-Nov-10 21:44 
GeneralReason for my vote of 1 Very poor article Pin
rmarkram22-Oct-10 3:03
rmarkram22-Oct-10 3:03 
GeneralReason for my vote of 5 Also this one is good too Pin
thatraja21-Oct-10 21:29
professionalthatraja21-Oct-10 21:29 
GeneralReason for my vote of 5 Hay que ahorrar... Pin
souto18-Oct-10 20:41
souto18-Oct-10 20:41 
GeneralReason for my vote of 4 good one Pin
Mamta Malkar18-Oct-10 18:53
Mamta Malkar18-Oct-10 18:53 
GeneralReason for my vote of 1 Not working Pin
Pokar Satyam14-Oct-10 8:08
Pokar Satyam14-Oct-10 8:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.