One more here asking: Delete Blank Lines??

A place to try and solve your RegEx problems.
Post Reply
User avatar
nkormanik
Posts: 8
Joined: Sat May 27, 2017 12:35 pm

One more here asking: Delete Blank Lines??

Post by nkormanik »

I think I've tried just about every RegEx combination I could find out there. No luck.

Given: Text file with some blank lines thrown in.
Objective: Remove those blank lines.

Of course, using TextCrawler.

Can TextCrawler do it??

Closest I think I came:
Search: ^$\n?
Replace with: nothing

If not, no problem. I'll find an alternative way.

But, I'm hoping TextCrawler is capable of removing blank lines.....

Thanks,
Nicholas Kormanik
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: One more here asking: Delete Blank Lines??

Post by DigitalVolcano »

This should do it-

Code: Select all

^\s+$[\r\n]*
You do need to checkmark the 'Multi-line anchors' option though.
This will match lines with just spaces and tabs also.
User avatar
nkormanik
Posts: 8
Joined: Sat May 27, 2017 12:35 pm

Re: One more here asking: Delete Blank Lines??

Post by nkormanik »

Bummer. "No matches found...."

Any other ideas?
Post Reply