On Thu, Nov 15, 2001 at 01:55:41AM -0500, Jeff 'japhy' Pinyan wrote:
> On Nov 15, Uri Guttman said:
> 
> >  J'P> perl -pe 
>'s/^\s*#(?>\s*)(?!include|define|if(n?def)?|el(se|if)|undef|endif).*//s'
> >
> >#ifbar
> >
> >should be filtered out but isn't. you can only pass lines which start
> >with exact cpp command tokens
> 
> Then see my more recent posting, which I sent after I saw the \b post.


What's the \b going to win you? If you look at the sed equivalent,
the keyword needs to be followed by horizontal whitespace.

#if--  

should be filtered out, just like

#ifbar

But using a \s should get you there.


Abigail

Reply via email to