procmail
[Top] [All Lists]

Re: Trouble with multi-line MATCH

2000-02-18 01:34:29
On Thu, 17 Feb 2000 12:59:09 -0600, Philip Guenther 
<guenther(_at_)gac(_dot_)edu>
wrote:
Ralph SOBEK <sobek(_at_)irit(_dot_)fr> writes:
On a related note, since "The regexp engine has to keep track of
all of those possibilities", will one day exist a possibility to
backtrack and find the *next* match, in the case that the first
one does not succeed completely. Can you add this to the "Wish
List"? This may be too much for procmail. Maybe I should look at
something else. Any suggestions?
Well, that's what the regexp engine does already. If later parts of
the regexp don't match then the other possibilities are considered
(actually, it considers them simultaneously). If you're talking
about applying non-regexp conditions on the later part of the match
(e.g., "match two multi-digit space separated numbers, requiring
the first one to be larger than the second") then that's a *lot*
more complicated. Perl's mongo regexps can do this with the new,
experimental, and scary "(?{ code })" syntax, but lacking a good
base language, this is quite a bit beyond the capabilities and
desgin of procmail.

What I thought he was asking, after thinking the same thing you
apparently thought, was if there could be something less cumbersome
than recursive INCLUDERC=s and all that jive to look for a
multi-condition pattern. If there are many matches, Procmail will grab
the first, but perhaps it is the second one which would satisfy your
additional checks against MATCH. That sort of thing is what I imagine
this is about. (But I haven't really gone back and looked at the start
of this thread. Anyway, if that's not what Ralph meant, consider this
one of +my+ top items for the wish list.)

/* era */

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition