procmail
[Top] [All Lists]

Re: Procmail regexp's not case-sensitive?

1997-06-11 06:59:00
"cicho" == cicho  <cicho(_at_)free(_dot_)polbox(_dot_)pl> writes:

cicho> Hello, This is just a follow-up to my previous long post of
cicho> today. I've been trying t catch subjects in all caps, but for
cicho> some reason I cannot understand, the rule

cicho> :0
cicho> * ^Subject:[^a-z]*$
cicho> $TRASH

cicho> does *not* match any of the following:

cicho>  Subject: ALLCAPSHERE
cicho>  Subject: THIS IS ALL CAPS
cicho>  Subject: ALL CAPS, CAPS ONLY!
[snipped]

Well, procmail's regex engine is case insensitive by default, as you
will find out for sure if you read procmailrc(5). The same man page
gives you a solution for the problem: the `D' flag.

This will do what you want:

:0D: # Note: You forgot the lockfile
* ^Subject:[^a-z]*$
$TRASH

-- 
Guy Geens <ggeens(_at_)iname(_dot_)com>
Home Page: http://www.elis.rug.ac.be/~ggeens
finger ggeens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be for PGP public keys (or use 
keyserver) 
"Now excuse me, I have some Daemons to fight"   -- Firkin

<Prev in Thread] Current Thread [Next in Thread>