Page 1 of 1

Reject subject filter help with [a-z]

PostPosted: Thu Jun 17, 2004 8:01 pm
by gainesb
OK, I am frustrated here. I have used regular expressions for over 10 years and can not seem to reject some common spam in subjects in newsbin 4.3.1 that I want to get rid of. I've read the newsbin regex page but it only shows a subset of what a full regex can do.

Example:

Subject: This is the subject (akasdf)

Every spam message ends the subject with a pair of parenthesis with some number of lower case letters between them.

In version 4.3.1, I tried the following. All find a match with "grep" and "vi" on UNIX and the PC editor "textpad". But only a couple match with the newsbin regex matching.

1. ([a-z]+)$ - matches all subjects in 4.31 (why?)
2. \([a-z]+\)$ - matches nothing in 4.31 (shouldn't it)
3. (.+)$ - matches all subjects in 4.31 (why?)
4. \(.+\)$ - matches my string in 4.31 (I don't want all chars in parens)
5. ([^0-9]+)$ - matches all subjects (why?)
6. \([^0-9]+\)$ - matches my string - (not really matching just lower case)

I can't see that the class [a-z] or [A-Z] is working. I tried every possible combination. As I said all six of these regex work in Unix and Textpad, but only #4 and #6 seem to come close in 4.3.1.

How do I reject the subjects of this type? I am sick of this spammer.

PostPosted: Thu Jun 17, 2004 8:13 pm
by dexter
The regex library linked in to newsbin is not a full regex implementation. Also, everything is forced to case insensitive. You have to play with it to get the results you want.