On Fri, 25 Aug 2000 15:17:53 -0600, Keith Russell wrote:
[skip]
KR> For those who haven't seen the way Pobox handles this, they run a
KR> message through their filters, and if it's identified as potential
KR> spam, a string such as "[spam score 10.00/10.0-pobox]" or "[spam score
KR> 3.04/10.0-pobox]" is prepended to the subject.
[skip]
KR> And for you regular expression gurus out there, what could I use to
KR> select, for example, all messages with ratings between 5.01 and 9.99,
KR> for example?
I probably don't qualify as guru or something, but as Alexander
Kiselev stopped reading this list, I'm gonna make a try...
A RE to match "[spam score x.xx/10.0-pobox]" with x.xx in the range
5.00..9.99 would be
\[spam score [5-9]\.\d\d/10\.0-pobox\]
I didn't test this, but give a short explanation: i merely copied the
string, prepended characters with a special meaning with a '\' (in
this case the brackets and the dots) and made up a pattern for x.xx.
"[5-9]" accepts one digit in the range from 5 to 9 (not very hard to
believe) and "\d" accepts any digit.
If you really wanted to match only 5.01..9.99, it would get more
complicated (RegExp have no comparison operators), so you'd have to
combine three patterns: "[5-9]\.\d[1-9]", "[5-9]\.[1-9]\d" and
"[6-9]\.\d\d". That would look like:
"([5-9]\.\d[1-9]|[5-9]\.[1-9]\d|[6-9]\.\d\d)". Pretty complicated to
get rid of the number 5.00...
There might be other alternatives to exclude "5.00", perhaps with
assertions, but for this stuff I'd have to read the help page at lest
three times...
Regards
Peter
--
Peter Steiner <[EMAIL PROTECTED]>
--
--------------------------------------------------------------
View the TBUDL archive at http://tbudl.thebat.dutaint.com
To send a message to the list moderation team double click here:
<mailto:[EMAIL PROTECTED]>
To Unsubscribe from TBUDL, double click here and send the message:
<mailto:[EMAIL PROTECTED]>
--------------------------------------------------------------
You are subscribed as : [email protected]