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

Re: [FWP] odd thing from #perl a few moments ago



1999-11-19-02:55:39 Randal L. Schwartz:
> Each record started with timestamp, and continued along successive
> indented lines (one to many lines).
> 
> Problem: he wanted just the records with "interesting".

This is the same as continuation lines in email headers, and I was just
recently reading mjd's description of Abigail's application of negative
lookahead assertions for them. So how about

	perl -e 'undef $/;print grep { /interesting/i } split /^(?!\s)/m, <>'

Have an appropriate amount of fun,

-Benett

PGP signature