Page 1 of 1

Trapping integer values in rules

Posted: Mon May 17, 2004 11:24 am
by No'am
Is there a way of trapping integer values in rules?

My company's email has a spam filter which gives lines like
X-Junkmail-Status: score=62/50

The above is easy to trap, because I can write a rule looking for the string
X-Junkmail-Status: score=6

But what if the value is 125?
X-Junkmail-Status: score=125/50
Testing for the strings
X-Junkmail-Status: score=1
or X-Junkmail-Status: score=12
would give me false matches.

Posted: Mon May 17, 2004 2:04 pm
by Borgtex
use regexp, something like:

X-Junkmail-Status: score=(\d{2}|[6-9])\d

Trapping integer values in rules

Posted: Mon May 17, 2004 4:09 pm
by No'am
(\d{2}|[6-9])\d

Thank you. Yes, I can see how that works.

Looking for a place to insert the rule, I see that version 3.0.3 doesn't support regexps, but version 3.1 does, so I'm downloading that now.