You had:

perl -ne'/^\s*#(?!\s*((ifn?|un)def|(el|end)?if|define|include|else)\b)/||print'

I suggest:

perl -pe's/^\s*#(?!\s*((ifn?|un)def|(el|end)?if|define|include|else)\b).*//s'

Note that without the /s modifier, . will NOT match the trailing \n, so
I'd have to add \n to the end of the regex, adding a character to the
count.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **

Reply via email to