On Thu, Nov 15, 2001 at 07:42:41AM -0500, Keith C. Ivey wrote:
> Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote:
> 
> > 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.
> 
> An alternative would be to use the -l switch in place of the /s 
> modifier.  That strips off the newline on input and puts it 
> back on on output.

That will not work in this case, because it would print out a newline for
every line of input, including the ones that are being skipped.

Ronald

Reply via email to