procmail
[Top] [All Lists]

Re: Score and _AND_

2002-10-10 13:32:33
On Thu, 10 Oct 2002, Professional Software Engineering wrote:

At 18:23 2002-10-10 +0221, Udi Mottelo wrote:

        In the first one procmail scan the message three time.  In the
        second only one.  Is it because of the 1^1 ?

That expression means that it will continue scanning the source until the
end (otherwise, how can you know if there were or were not additional hits
to affect the scoring).  Any time there is a nonzero after the caret (^),
you can figure you're going to scan to the end of the source to satisfy the
condition.


        It makes sense, but, I expected that procmail checks the input
        against every regx from the recipe in one phase, for example,
        if we have recipe:

* 1^0 abcd
* 1^0 xyz
* 1^0 aq1aw3

        and the input stream is:

aCBmbxyz3IgYSB0b3RhbCabcdBvZg0KIDUwLgT3V0aq1aw3IG9mIHRob3NlIDUwLDAw...
^                    ^                   ^
        When procmail meets the first "a" it tries to compares against
        all the regx start with "a" ("aq1aw3" and "abcd").  Doesn't
        work like this in the (abcd|xyz|aq1aw3) case?

        Sean, yours explanation is excellent and I hope that the FAQs
        authors will include or link it.

Thanks,
 Udi

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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