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 » Mon Apr 06, 2020 12:52 pm

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: 1257
Joined: Thu Jun 09, 2011 10:04 am

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

Post by DigitalVolcano » Tue Apr 07, 2020 10:05 am

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 » Tue Apr 07, 2020 12:00 pm

Bummer. "No matches found...."

Any other ideas?
Post Reply