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

Expression Filtering for Whole Words...

Hello All,
I am tring to filter out "bad" words. I can get it to filter but it is filtering the string, thus causing valid word to get filtered. i.e.; I want to filter the word "stud" so I do "[Ss][Tt][Uu][Dd]". This not only filters "stud" but also "student".

I tried to us the "\b" option with no luck, "\b[Ss][Tt][Uu][Dd]\b".

Any thoughts? FYI - I am on v5.100.


This thread was automatically locked due to age.
Parents
  • Ok, I got it...

    [\s][Ss][Tt][Uu][Dd][\s] works for blocking just the word.
  • Hello,

    don't know  why \b isn't working on your Astaro. I'm using it, and it does work (Astaro 5.2xx)

    BTW: when you put  (?i) at the beginning of the expression, it makes the expression case-insensitive.

    So the following expression should also match "stud", "STUD", "sTUd", etc.:
     [ QUOTE ]
     (?i)\bstud\b  

    [/ QUOTE ]

    I guess you know that
     [ QUOTE ]
     \sSTUD\s 

    [/ QUOTE ]
    doesn't work when "stud" is at the beginning or end of a line.
  • hi
    i'm not very familiar with these  "Perl-compatible regular expressions".
    so i produced following log-entries:
    ... rejected after DATA: Matched regular expression: [Sperm pills] (blacklisted)
    (yes - with sqare brackets!)

    we got some (more) unwanted mails with "[Sperm pills]" in the body, so i wanted to get them out, just copied this into expression filter and - voila! - some important mails were rejected. [:O]
    in asl-onlinehelp it's only sad: "Perl compatible expressions" but no examples, no listing of dangerous characters ....

    as asl is also adressing "semi-professional" users - i think this could be nice to explain it a little closer - maybe an example just at the input areas?!

    whats happening with entries of strings like:
    "klickTel + klickIdent jetzt"
    "http://www.eurotransfer.co.uk"
    "www.klick-jetzt.com"
    (entered without "" )

    also something dangerous?

    kind regards, christian [:S]
  • maybe it's in the headerline?

    ... none (ab.cd.de: aaa.bbb.ccc.ddd is neither permitted nor denied by domain of senders.domain.de) client-ip=xxx.yyy.zzz.aaa

    still a little confuse .... [S is not  [S  nor  [\S ... oder doch?

    schaun wir mal ... [;)]

    gruß, christian
  • Text inside brackets means to catch the characters that you put there so [something] will catch a lot of different words. Your double quotes might work, but dot has a special meaning and shouldn't be used.

    For more knowledge on regexp you might want to have a look at http://www.regular-expressions.info/characters.html and the whole site too of course. Good luck!
Reply Children
  • Am I  correct in thinking that these REGEX entries are to be entered into the SMTP Proxy under the Expressions Table?

    I would like to try this but also want to make sure I am adding this in the correct place. 

    Thanks