Closed Thread Icon

Preserved Topic: Regexp madness (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=20954" title="Pages that link to Preserved Topic: Regexp madness (Page 1 of 1)" rel="nofollow" >Preserved Topic: Regexp madness <span class="small">(Page 1 of 1)</span>\

 
jiblet
Paranoid (IV) Inmate

From: Minneapolis, MN, USA
Insane since: May 2000

posted posted 09-05-2001 17:27

I think I'm bumping into the limitations of BBEdit's regexp routines here. But keep in mind that it's supposed to emulate GREP (is that POSIX style regexps?), not PerlRe. Basically I just want to delete all blank lines out of my text file. I was using the following regexp but it doesn't seem to be matching:

$^\s*$

Shouldn't that match an empty line with some tabs and spaces on it?

-jiblet

Piper
Paranoid (IV) Inmate

From: California
Insane since: Jun 2000

posted posted 09-05-2001 18:21

Hi jiblet,

For a perl regex you would need something like s/^\s*$// to get rid on blank lines with or wihtout spaces and not get rid of indents. I am not familiar with BBEdit's use of regex so I am not sure how that will work fo you.

Regards,
Charlie

jiblet
Paranoid (IV) Inmate

From: Minneapolis, MN, USA
Insane since: May 2000

posted posted 09-06-2001 18:52

Yeah, like I said BBEdit is supposed to emulate GREP Regexps, not PerlRe

-jiblet

Piper
Paranoid (IV) Inmate

From: California
Insane since: Jun 2000

posted posted 09-06-2001 19:47

This link might help you out: GREP Regex

Looks like ^ *$ should work.

Regards,
Charlie

« BackwardsOnwards »

Show Forum Drop Down Menu