Spam Filter ISP Support Forum

  New Posts New Posts RSS Feed - RegEx
  FAQ FAQ  Forum Search   Register Register  Login Login

RegEx

 Post Reply Post Reply
Author
meatboy View Drop Down
Newbie
Newbie


Joined: 26 June 2006
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote meatboy Quote  Post ReplyReply Direct Link To This Post Topic: RegEx
    Posted: 01 February 2011 at 8:19pm
Hi,  we've been running SF v424.834 for sometime and its been very good. Recently we have been hit with some spam that requires key words to sort them but every time I look at regex, I just can't get my head around it.

I'd like to block an email address used in the text of the spam for example :

info@we-spam.com

Now clearly I could use the "we-spam" text but how do I put this literally into the keyword area, the dash of course has an effect in specifying a range.

Is the correct method to use say we\-spam to remove the metacharacter function of the dash?  Should I be using square brackets as well [we\-spam]  ??

How can I use absolute literal text no matter the character?

Hope this is not too dumb a question. Thanks.
Back to Top
LogSat View Drop Down
Admin Group
Admin Group
Avatar

Joined: 25 January 2005
Location: United States
Status: Offline
Points: 4068
Post Options Post Options   Thanks (0) Thanks(0)   Quote LogSat Quote  Post ReplyReply Direct Link To This Post Posted: 01 February 2011 at 9:45pm
meatboy,

A RegEx keyword in SpamFilter to block info@we-spam.com would be (the parenthesis are used in SpamFilter to indicate that the keyword is a RegEx expression):
(we\-spam)

you could also use a non-regex keyword by simply spelling out the literal characters you wish to look for:
we-spam


Roberto Franceschetti

LogSat Software

Spam Filter ISP
Back to Top
yapadu View Drop Down
Senior Member
Senior Member


Joined: 12 May 2005
Status: Offline
Points: 272
Post Options Post Options   Thanks (0) Thanks(0)   Quote yapadu Quote  Post ReplyReply Direct Link To This Post Posted: 02 February 2011 at 10:49am
Hmmm...

I don't even think you need the \- part.  I think you are safe to use (we-spam) because the - is not defined as part of a character set [].

I could be wrong of course as I am no regex expert but the test I just did says you don't need it (but did not seem to hurt putting it in either).

As roberto said, you don't really need regex for that example though.
--------------------------------------------------------------
I am a user of SF, not an employee. Use any advice offered at your own risk.
Back to Top
meatboy View Drop Down
Newbie
Newbie


Joined: 26 June 2006
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote meatboy Quote  Post ReplyReply Direct Link To This Post Posted: 03 February 2011 at 6:20pm
Thanks guys for the tips and direction. I think I was making it harder than it really is. Maybe just missed something in the instructions. The addition is working really well and a few other tweaks are getting them. My users think its all gone quiet now but really SF is doing all the work!! Clap
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.078 seconds.