Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: No rule activation on validated RegEx
PostPosted: 2007-11-07 23:01 
New user
New user

Joined: 2005-10-01 13:02
Posts: 15
Hi,

I am trying to delete all incoming mail where the "To:" field contains a formal format of a first name, middle initial and last name. I built a regex that passed the validation in http://www.dotnetcoders.com/web/Learnin ... ester.aspx on the provided test case below, but messages still pass through. Any hint where to look would be appreciated. I am using hMailServer V.4.3.1- B253.

Details:

My regex is: "[\w]+\s[A-Z]\.\s[\w]+"

A test mail that passes through:
To: "Puke Z. Scumbag" <[email protected]>

I have 2 other rules before this regex one, but they only delete mail on some keyword findings using the "contains" search type.


Top
 Profile  
 
 Post subject:
PostPosted: 2007-11-07 23:05 
Developer
Developer

Joined: 2003-11-21 01:09
Posts: 6311
Location: Sweden
Quote:
I built a regex that passed the validation in http://www.dotnetcoders.com/web/Learnin ... ester.aspx on the provided test case below, but messages still pass through.


It passes the validation but it doesn't match the complete field properly. If you go to the page and click "Matches" you see that it's only a partial match. A full match is needed..


Top
 Profile  
 
 Post subject:
PostPosted: 2007-11-08 00:00 
New user
New user

Joined: 2005-10-01 13:02
Posts: 15
I appreciate the help, Martin.
I did a full line match by using "[\w]+\s[A-Z]\.\s[\w]+".*$ and it worked.

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: mattg, norponto and 1 guest



Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group