Page 1 of 1

Fix Double Space file - Delete every other line?

Posted: Fri Mar 25, 2005 6:29 am
by othni
What would be the best way to fix a file that, for some reason, was written with a blank line every other line.

I am thinking of using the Remove Blank lines filter.

Is that the best way?

Posted: Wed Apr 06, 2005 11:21 am
by DataMystic Support
Yes. I thought that would be obvious!

Posted: Wed Apr 06, 2005 11:54 am
by Guest
Is not the same to remove all blank lines than to remove every other line (that just happen to be bank).

There maybe blank (valid) lines that I do not want removed.

If there are two blank lines together, only one should be removed.

Posted: Wed Apr 06, 2005 5:34 pm
by DataMystic Support
Sorry! I see what you mean.

You can remove blank lines by doing an EasyPattern search replace like this:

[ capture( 0+ not cr or lf ), cr lf,
cr, lf ]

Replace with:

$1