procmail
[Top] [All Lists]

Re: scanning the topmost N lines

1997-05-11 05:37:00
On Fri, 9 May 1997 15:49:40 -0500 (CDT),
dattier(_at_)wwa(_dot_)com (David W. Tamkin) wrote:
A while back -- at least a year if not longer -- somebody asked how to see
if a regexp is matched in the first six lines of the body.  I suggested the
following, where "(^.*)?" appears 6 - 1 = 5 times:
  :0B
  * $ ^^.*(^.*)?(^.*)?(^.*)?(^.*)?(^.*)?$pattern
  action

Stephen, is there any chance of getting the regexp engine to
understand braces? Then you could just write $ ^^.*(^.*){,29}$pattern
They're not a construct you need very often but when you do, they can
save a lot of frustration.

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

<Prev in Thread] Current Thread [Next in Thread>