procmail
[Top] [All Lists]

Re: Extracting in an Alternation (Was Scoring Function Question)

1999-04-15 11:29:57
"David W. Tamkin" <dattier(_at_)Mcs(_dot_)Net> writes:
...
Heck, if it weren't for the extraction operator, we could combine the first
two:

 * 9876543210 HB ?? ^^(.+$)*((From|Subject):.*Condition1|$(.*$)*.*Condition2)

If "Condition1" and "Condition2" had been the same, we could manage it even
*with* the extraction.  The limitation is that you can't extract inside an
alternation (though you can alternate on either side of an extractor)  I've
occasionally wished it were possible, but changing it probably would break
something else (besides bloating the code).

The code design that creates the "no extraction inside an alternation"
rule is the very design that causes other subtle problems with the
extraction operator, so it may be fixed at some point.

Actually, putting an extraction in an alternation doesn't _always_
break.  It just doesn't always _work_, and when it doesn't the results
are rather peculiar.  If anyone is _depending_ on a certain form of
lossage in the extraction operator, they deserve to lose when it gets
fixed.


Philip Guenther