Thanks era.

However, If I place a letter boundary, wouldn't words like

Sussex, essex etc get blocked?

Many thanks

Tom




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 03 November 2003 10:26
To: [EMAIL PROTECTED]
Subject: [SAtalk] Re: help


On Fri, 31 Oct 2003 07:40:06 +0200, Thomas Kinghorn <[EMAIL PROTECTED]>
posted to spamassassin-talk:

(Weird quoting ... are you replying to yourself?)

 >> \b[Ss][ ./_*-]*[Ee][ ./_*-]*[Xx]\b
 >> Is this syntax correct.

Yes, but it's probably not what you want.

 >> I have tested using various mails and so far no false positives HOWEVER,
 >> my colleague complained
 > that a blank e-mail with an attached word.doc was rejected using the
above
 > rule.
 > I Have tried S e X, SeX, S-E-X, which matched AND Sussex,essex & asexual,
 > which did not match.

You are using way too lax expressions between the letters. It is no
surprise that an attached Word document would happen to contain a
sequence which matches contains the letters s, e, and x with some
random punctuation between them.

s./_*-./*_.ex or se./-.*./-* .x match the regex; the words you tried
obviously do not contain \b:s on both sides of the sequence s-e-x
which is what your regex requires.

Try reducing the punctuation by some other means, like for example by
allowing for only a maximum of three non-word characters between the
letters, like so: /\b[Ss]\W{0,3}[Ee]\W{0,3}[Xx]\b/

/* era */

-- 
The email address era     the contact information   Just for kicks, imagine
at iki dot fi is heavily  link on my home page at   what it's like to get
spam filtered.  If you    <http://www.iki.fi/era/>  500 pieces of spam for
want to reach me, see     instead.                  each wanted message.



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to