Print Page | Close Window

question on regular expressions and unfiltered email

Printed From: LogSat Software
Category: Spam Filter ISP
Forum Name: Spam Filter ISP Support
Forum Description: General support for Spam Filter ISP
URL: https://www.logsat.com/spamfilter/forums/forum_posts.asp?TID=3656
Printed Date: 21 December 2025 at 8:25am


Topic: question on regular expressions and unfiltered email
Posted By: Guests
Subject: question on regular expressions and unfiltered email
Date Posted: 27 May 2004 at 6:09pm

I suspecting that this may be another bug with the demo version but here goes...I only want to filter 1 or 2 email addresses and let the rest go unfiltered during preliminary testing of the spam filter.  I go to the whitelist/unfiltered emails tab and have put in a negative regex expression to set all addresses unfiltered except 2 addresses.  This didn't seem to work as these addresses were still filtered.  Was there a better way to do this?

regex expression  (^[^poptech|crosst])

When I test this expression with my tools it works every time...when I use the regex tester with spamfilter it works sometimes....

Terry




Replies:
Posted By: LogSat
Date Posted: 27 May 2004 at 11:50pm

Terry,

In RegEx the brackets [ ] cannot contain "words", as I thing is your intention (poptech and crosst). The following elements / class expressions are instead allowed:

Simple Characters:
These are single characters that match themselves. To match a right square bracket (]), it must be the first character of the class expression, after any initial circumflex (see Negated Class Expressions). To match a hyphen, it must be either the first or the last character of the class expression. For example [AaBb] matches upper or lower case A or B.

Negated Class Expressions:
If the first character of a class expression is the circumflex (^), the expression matches any character not in the class. For example [^AB^] matches any character except A, B and the circumflex itself.

Range Expressions:
A range expression is two characters separated by a hyphen (-). It matches any characters with code points between those of the two characters. For example, [A-Za-z0-9-] matches any upper or lower case letter or digit, or the hyphen itself. Note that [a-z] also matches upper case letters, unless the option to match case is selected.

Character Class Operators:
These can be used as an alternative way of representing classes of characters. For example, [a-z] is equivalent to [[:lower:]] and [a-z0-9] is equivalent to [[:lower:][:digit:]]. (Note the extra pairs of brackets.) The defined classes are:

Hope this helps,

Roberto F.
LogSat Software



Posted By: Guests
Date Posted: 28 May 2004 at 9:28am
thanks Roberto.  I am new at regular expressions and will dig some more into this.  Thanks again.



Print Page | Close Window