Page 1 of 1
Replacing extra blank lines
Posted: Tue Oct 16, 2001 2:20 pm
by Geoffrey Baker
How can one find and get rid of multiple blank lines in a replacement operation?
Something like replace
[\n]+
with
\n
???
any help would be appreciated.
thanks
Geoffrey Baker
Re: Replacing extra blank lines
Posted: Tue Oct 16, 2001 4:14 pm
by Andreas
unfortunately, +, * and so on do not work together with \n
search for \n\n and replace with \n
repeat until no replacements occur.
Re: Replacing extra blank lines
Posted: Tue Oct 16, 2001 4:22 pm
by Ken Grubb
regex Find ^\n\n
Mark All
Close
Edit, Delete, Bookmarked Lines
I have this set up in a Macro. It's probably also a good idea to include Search, Clear All Bookmarks BEFORE the Find.
Re: Replacing extra blank lines
Posted: Wed Oct 17, 2001 7:26 pm
by Geoffrey Baker
thanks to all;
Ken, yours works very nicely and cleans them all at once. I've FINALLY created a macro that will let me clean *everything* except valid email addresses out of a file and then get rid of the spacing as well. very handy.
Geoff