procmail
[Top] [All Lists]

Re: exactly once

2004-08-25 05:59:18
Dallman Ross wrote:

Cool beans.

They can be reheated.

Now, David, you can take a few minutes to tell us *why* it works.

Peeler and I have already squared off over that and returned to our cor- ners. I just figured, what kind of score would reach an extreme for matching once, outside the range of results for zero or two ore more? It had to involve a convergent series. If the goal were to match on 0 or 1 but not on 2 or more, this would do the job:

* 1.1^0
* -1^.5 regexp

but so would

* 2^0
* -1^1 regexp

When there's a concern about finding dozens of matches and wanting to abort on the second instead of continuing to look when it no longer matters, your infinity shuffle handles that:

* 2^0
* -2147483647^0
* -1^1 regexp
* 9876543210^0


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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