Re: Checking a match for numbers

udi M <[email protected]> Thu, 24 Aug 2017 11:20:41 +0300
Newsgroups gmane.mail.procmail
Organization tau
Message-ID <[email protected]>

On 17/08/17 20:13, @lbutlr wrote:
> I want to check the contents of a variable for "too many" numbers
>
> I'm sure there's a clever way with a weighted or match
>
> something along the lines of "more than 4 numbers and more than 20% of th=
e characters"
>
> (A lot of mailers are now polluting the list-ID header with bullshit, and=
 I want to detect that so I can discard the list-ID when it's garbage)
>

Start with this two following hints.   The 20%  must be simple too - but =

I have
math-phobia to figure out the score recipe.

(Note: maybe the score will not give you *_exactly_*  20%)

0:
* 1^1 .
{ all_chars=3D$=3D }

0:
*  -4^0
*  1^1  [0-9]
{ more_then4=3D"yes" }


--udi