procmail
[Top] [All Lists]

Re: Checking a match for numbers

2017-08-28 20:19:01
On 23 Aug 2017, at 12:53, David W. Tamkin <dattier(_at_)panix(_dot_)com> wrote:
# If the number of digits is more than 4, continue and don't skip.
:0
* 1^1 VARIABLE ?? [0-9]
* -4^0
{
# Fetch previous score and add back 4 to get digit count again;
# then subtract 1/5 the length of the variable.
:0
* $=^0
* 4^0
* -.2^1 VARIABLE ?? .
action
}

That looks good. Hadn't thought about a fractional score.

-- 
Apple broke AppleScripting signatures in Mail.app, so no random signatures.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de
https://mailman.rwth-aachen.de/mailman/listinfo/procmail

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