Walt Mankowski on Fri, 2 Feb 2001 11:00:22 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] regexp???


On Fri, Feb 02, 2001 at 10:28:46AM -0500, MaD dUCK wrote:
> also sprach Kevin Falcone (on Fri, 02 Feb 2001 09:46:08AM -0500):
> > if (/the (?!house).* is big/)
> 
> can this be used in grep? looks more like perl, doesn't it?

Umm, that's because it is Perl.  Negative lookahead assertions are a
fairly recent addition to the Perl regex engine and are almost
certainly not available in grep.

You might try something like

/the [^h][^o][^u][^s][^e].* is big/

which unfortunately will fail to match anything less than 5 letters.

Walt

Attachment: pgpQx3ZL26ymQ.pgp
Description: PGP signature