-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Craig McLean wrote:
> Jean-Paul Natola wrote:
>>> Hi all
>>>
>>> These homeowner  spasm are still getting through ( a lot less though since
>>> adding the KAM_GEO_STRING2 rule.
>>>
>>> I do NOT know how to write rules, but I have an idea that perhaps can reduce
>>> the homeowner / credit spams.
>>>
>>> It would be something along the lines of;
>>>
>>> If message contains the % symbol  score it .2
>>> If message contains the % 2 times score it .5
>>> If Message contains the % 3 or more times score it 1.5
> [snip]
> 
> Just a quick note of caution, It's a bad idea to match on multiple
> occurrences of single characters (like %). Off the top of my head, I can
> think of a half-dozen opt-in newsletters which I get that offer
> discounts ( "10% discount", " saving of 17%",  "get 20% off" etc.) and
> would easily contain a dozen "%" characters.
> If you are going to match, try doing it with patterns, like (off the top
> of my head, and untested!)
> 
> /(?:£\$}\s?\d+(?:[\.,]\d+)?.{1,20}\d.{1,10}%/
> 

Heh, need more coffee, should be \$) not \$}, but even so it belongs in
a [], not a ()..... Right, get the kettle on...

/[£\$]\s?\d+(?:[\.,]\d+)?.{1,20}\d.{1,10}%/

C.
- --
Craig McLean            http://fukka.co.uk
[EMAIL PROTECTED]       Where the fun never starts
        Powered by FreeBSD, and GIN!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEaKs5MDDagS2VwJ4RAgxoAJ0XZBtldWsosVUZSOlEsxW96NolUQCffmrE
NQk8iPHch0U//HW8rc+rMRU=
=BdpK
-----END PGP SIGNATURE-----

Reply via email to