Print Page | Close Window

RegEx re-Visited

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=2985
Printed Date: 03 June 2025 at 7:07am


Topic: RegEx re-Visited
Posted By: Desperado
Subject: RegEx re-Visited
Date Posted: 22 February 2004 at 11:38pm

All,

I am feeling dumb here!  Anyone have any luck creating a working "AND" expression?

Examble:  I do not want this in a message

I want to detect that "do" and "message" are in the same message and not only that, I wat to mak sure they are within 25 characters of each other and in any order.  In other words, just so long as the word "do" and "message" are as close or closer than 25 characters from each other but "message" can be befor or after "do".

This type of search can be done using Perl but gets very tricky and has a fair amount of overhead to it because you must buffer it ... at least that is the only way I know. SpamFilter may not be able to do this due to the "any order" requirement.

Perhaps, I am just not in the correct mind set and it is real simple.  That happens you know!

Regards,

Dan S.




Replies:
Posted By: Guests
Date Posted: 25 February 2004 at 3:42pm

Why not make two tests:  One for "do" and "message" in that order, and the other for "message" and "do" in that order.

Easier than buffering.

I guess it would be annoying if you needed to check for 3 words in any order




Print Page | Close Window