On Wed, 15 Jan 2003, David W. Tamkin wrote:
| Empirically, the entire parenthesized expression is
| matched minimally before considering the \/ subexpression.
Bart, I think it's more the case that procmail found the first match and
then, had it been the alternative that included the extractor, would
have extracted.
I think we're saying the same thing in different words, again.
| * (^In-Reply-To:[^<]+<\/[^>]+|^^(.|$)*^^)
You probably don't need that outermost pair of parentheses.
True. I tend to put them in as a warning that there's an alternation or
repetition operator involved, e.g., when I see "(" I start looking for
"|" and/or ")?" etc. Just helping out my wetware regex parser.
So procmail will pick the alternative that ends first over the one that
begins first? That's something I wouldn't have expected.
Not exactly. In a condition without scoring, the regex engine is
optimized to stop scanning as soon as possible, for performance reasons.
That usually translates to "pick the alternative that ends first." Given
a scoring condition, however, I'm not sure the same rule would hold; it
may depend on how the matching substrings overlap, if they do.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail