Find and replace multiple blank lines
Within notepad there is no way to use the Find and Replace and target blank lines. Consider Notepad++ and the regex search and replace.
You can use \r\n
to find blank lines from text files made within Windows, \r
for Mac and \n
for Linux.
I believe a default install actually comes with TextFX to make your life even easier, it has an option to delete blank lines:
I think you can't do it in notepad; when I have such a problem, I open the text file with Word (any other word processor should go) and replace two consecutive paagraph marks with one of them. Repeat several times (until there is nothing more to replace) and you're done.
You should replace ^p^p
with ^p
since the original notepad is a real pita (and everyone else is suggesting their own fav anyway):
vim ftw with:
:g/^\s\+$/d