| > | 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.
Bart, I read yours as "procmail will pick the smallest match" (and then, if
it's a match to the alternative with the extractor, it will extract), while I
was saying that procmail will pick the earliest match (and then, if it's a
match to the alternative with the extractor, it will extract). So as far as I
could tell, we were saying different things.
| > 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."
Yes, I meant that only for the cases where procmail would stop at one
occurrence: unweighted conditions, negated conditions, or non-negated weighted
conditions where x=0.
| 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.
Indeed, and when one of the alternatives is the null string, there will be
infinite overlap.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail