Trapping integer values in rules

General discussion about PopTray. You love it? You hate it? Talk about it here.

Moderators: KY Dave, jojobear99, Rdsok

Post Reply
No'am

Trapping integer values in rules

Post by No'am » Mon May 17, 2004 11:24 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.

Borgtex
Groupie
Posts: 52
Joined: Mon Mar 08, 2004 1:32 pm

Post by Borgtex » Mon May 17, 2004 2:04 pm

use regexp, something like:

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

No'am

Trapping integer values in rules

Post by No'am » Mon May 17, 2004 4:09 pm

(\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.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests