procmail
[Top] [All Lists]

Re: Feature request: head\/MATCH\/tail

1997-07-05 04:51:00
era eriksson wrote:
Stephen, 

Would it be hard to patch the \/ kludge to allow for +two+ \/ tokens
in a condition line? What I have in mind is something like the \/
lookahead in lex, or Perl's (?=) lookahead assertion. 

So then, 

    [         ]*\/[^  ].*[^   ]\/[    ]*

would grab the longest non-blank string (with or without embedded
blanks) and place that in MATCH, but leave off the leading and
trailing whitespace.

What do you think?

This would be a most excellent plan - it woudl reduce my rules
significantly, because I subscribe to a lot of mailing lists on one
host.  Then I could do:

:0:lists/.lock
* Return-Path: <\/.*\/-request(_at_)demon(_dot_)net>
|rcvstore +lists/$MATCH

Or something similiar.  I'm just waiting for somebody to point out to me
that this can already be done in some bizzare manner, though, as I'm
fairly new to this.  :-)

-Dom

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