procmail
[Top] [All Lists]

Procmail regexp's not case-sensitive?

1997-06-11 04:56:00
Hello,

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

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

does *not* match any of the following:

        Subject: ALLCAPSHERE
        Subject: THIS IS ALL CAPS
        Subject: ALL CAPS, CAPS ONLY!

while it apparently "should" (for all I know about regular expressions, that
is).

Now, I've tried something else with even weirder results. I tried an ugly
simplified kludge solution, just to test what is happening. I used the following
rule:

* ^Subject:[- A-Z\.:,]+$

which should match only Subject fields containing UPPERCASE characters and some
punctuation marks; I didn't bother with listing all possible punctuation... Now,
this rule seems to match *everything*! Well, I tyested it a few times just now
and it matched (and /dev/null'ed) a message with the subject (I copy/paste):

        Subject: This should go through just fine

which seems to indicate, to my confused mind, that procmail evaluates regular
expressions with no regard to letter case! But this can't be, can it? Or is
there perhaps a setting/switch I don't know of? I haven't yet tested the
"basic", clean situation such as

        * ^Subject:.[A-Z]*$

which I will do now, but the above rule does not, I htink, include any meta
characters that could wreck the expression (and the period is escaped).


Any feedback will be much appreciated, more and more by the hour! :) What am I
doing wrong?

marek jedlinski


--
"If you're happy and you know it, clunk your chains."
email: eristic(_at_)gryzmak(_dot_)lodz(_dot_)pdi(_dot_)net (finger for public 
PGP key)
Largactil Café http://www.lodz.pdi.net/~eristic/index.html
Hail Eris. Hail Bopp. All Hail Discordia. Percolate.

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