[TriLUG] Regular Expression Help

Tarus Balog tarus at blast.com
Wed Dec 24 13:26:26 EST 2003


On Dec 24, 2003, at 11:55 AM, Nathan Conrad wrote:

> Hi,
>
> Here is a POSIX-compatible regular expression:
>
> ^Re: [A-Z]{2,8}, [^ ]* [^ ]* [^ ]*$

Thanks for everyone's help, but it is still stumping me. This is what I  
have in my postfix header_checks:

/^Subject: Re: [A-Z]{2,8}, [a-zA-Z]+ [a-zA-Z]+ [a-zA-Z]+$/     REJECT

Unfortunately, while is catches the SPAM, it also catches:

Re: Really, this should work

etc. Basically, it seems to be matching any word, 2-8 characters long,  
versus just words made up of capital letters. Something like:

Re: s, this is small

does not match.

-T

________________________________________________________________________ 
___
Tarus Balog							Main:		+1 919 545 2553
Blast Internet Services, Inc.			Fax:			+1 919 542 5955
Email: tarus at blast.com					URL: http://www2.blast.com/tarus
PGP Key Fingerprint: 8945 8521 9771 FEC9 5481  512B FECA 11D2 FD82 B45C




More information about the TriLUG mailing list