Page 1 of 1

Please Help: Removing Multiple Blank Lines

Posted: Sat Sep 09, 2006 3:01 pm
by textlearner
Hi there,

I am trying to remove multiple blank lines from text which looks like this:

"movie title"
"movie title"
1 blank line
"movie title"
3blank lines
3 blank lines
3 blank lines

"movie title"
2 blank lines
2 blank lines

"movie title"

I have tried search & replace using:

Find what: ^\n
Replace with:

This works, but only removes 1 blank lines, pressing replace again does not remove any of the multiple blank lines.

Any help much appreciated!!

Posted: Sat Sep 09, 2006 3:39 pm
by Bob Hansen
Replace: \n\n
With: \n
You may need to make multiple passes

Or you can do something like this:
Replace: \n\n\n\n\n
With: \n
Replace: \n\n\n\n
With: \n
Replace: \n\n\n
With: \n
Replace: \n\n
With: \n

How many \n you search for will depend on how many sequential blank lines you have. Personally I would probably do the first simple one mutlitple times. You could make it into a multiplay macro to run more than once.

Posted: Sat Sep 09, 2006 4:10 pm
by textlearner
Thankyou, works a treat :D