This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

regex help

I see some of you are good with regex from searching the forums. I was wondering if someone could help me. I'm trying the first regtex expression trying to block cialis in emails. at first I just put in the word cialis, but it also blocked lost of email with specialist in it. I then tried to understand the syntax of regex expressions, and thought /\ cialis/ would check for a space before the word, but that didn't block any emails for some reason. I noticed C was in capital, so I changed it to /\ cialis/i and still no luck. Anyone know what expression I could use to block emails with cialis in it, but not emails with specialist or anything other than cialis with a space in front of it? 

Thanks

Brian


This thread was automatically locked due to age.
Parents
  • Hi, at least in Perl regexes (I'm not an expert on Astaro's regexes), you can use \w for a 'word boundary', so

    /\wcialis\w/i 

    might work.

    Note the spammers often use images, l33t sp34k, special html chars, etc., to obfuscate words like this so you may not have much success with regexes.

    Barry
Reply
  • Hi, at least in Perl regexes (I'm not an expert on Astaro's regexes), you can use \w for a 'word boundary', so

    /\wcialis\w/i 

    might work.

    Note the spammers often use images, l33t sp34k, special html chars, etc., to obfuscate words like this so you may not have much success with regexes.

    Barry
Children
No Data