Click here to Skip to main content
Click here to Skip to main content

Remove blank lines from code in Visual Studio

, 13 Oct 2010 CPOL
Rate this:
Please Sign up or sign in to vote.
1. Click Ctrl+H (quick replace)
2. Tick "Use Regular Expressions"
3. In Find specify "^$\n"
4. In Replace box delete everything.
5. Click "Replace All"
All Blank lines will be deleted. Smile | :)
^ Means Beginning of line
$ Means End of line


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


About the Author

Dave Paras
Software Developer
India India
No Biography provided

Comments and Discussions

QuestionApplicable To Pinmembermaitrey6842-Jul-13 0:03 
QuestionThnx PinmemberRemya Viswan26-Feb-13 18:56 
GeneralMy vote of 5 PinmemberRenju Vinod12-Dec-12 20:39 
SuggestionIncluding spaces PinmemberMika3-Oct-12 0:20 
GeneralMy vote of 5 PinmemberKoshy Panicker John16-Sep-12 21:11 
GeneralReason for my vote of 5 i wish i read this an hour ago. i ha... PinmemberA. Duman27-Oct-11 22:47 
GeneralWorking. My vote of 5 PinmemberSyed Shabeer25-Oct-11 3:05 
GeneralReason for my vote of 5 Reason for my vote of 5 Good one PinmvpRaviRanjankr21-Jul-11 10:27 
GeneralReason for my vote of 5 Very helpful Dave!!! Came to know ab... PinmemberJyothikarthk15-Jul-11 0:26 
GeneralIt is great,Thank you PinmemberEric Yin 201216-May-11 1:08 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150327.1 | Last Updated 13 Oct 2010
Article Copyright 2010 by Dave Paras
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid