procmail
[Top] [All Lists]

Re: capturing the OR that succeeds ???

2004-05-14 18:16:27
Toen wij David W. Tamkin kietelden, kwam er dit uit:
Ruud streamlined it a little too much:

[...]
If ddd and eee are both present but eee occurs before ddd shows up, it
will pick up eee.

Yep, the previous version is better. The '1^0' is best returned at the 
bottom, as Dallman made me realize.

     :0 B D fw h
     * aaa|bbb|ccc|ddd|\/eee
     * 9876543210^0 ()\/aaa
     * 9876543210^0 ()\/bbb
     * 9876543210^0 ()\/ccc
     * 9876543210^0 ()\/ddd
     *          1^0
     | formail -I "X-Procmail: alphabet soup: $MATCH"



If match is still unset after the ccc-line, it must be ddd.
But if it's set (=eee), the scan for ddd should still happen:

     MATCH # unset

     :0 B D fw h
     * aaa|bbb|ccc|ddd|\/eee
     * 9876543210^0 ()\/aaa
     * 9876543210^0 ()\/bbb
     * 9876543210^0 ()\/ccc
     * 9876543210^0 MATCH ?? ^^^^
     * 9876543210^0 ()\/ddd
     *          1^0
     | formail -I "X-Procmail: alphabet soup: ${MATCH-ddd}"


-- 
Grtz, Ruud

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