Fix Double Space file - Delete every other line?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
othni
Posts: 34
Joined: Tue Mar 01, 2005 1:47 am
Location: San Juan, Puerto Rico
Contact:

Fix Double Space file - Delete every other line?

Post 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?
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

Yes. I thought that would be obvious!
Guest

Post 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.
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post 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
Post Reply