procmail
[Top] [All Lists]

Re: Distinguishing Case Egrep Matching

1999-04-06 12:25:11
Ralph SOBEK <sobek(_at_)irit(_dot_)fr> writes:
      Can one have the following:

:0 B:
* H ?? ()^Subject:.*test subject
* ! D ?? Herman [A-Z]+
maillist

This would accept e-mail with the appropriate subject and "Herman
Smith" in the body, but would refuse "Herman SMITH".

I only want to distingush upper and lower case on just ONE regular
expression.

Does this work?  I have the feeling, no!  Do I have to place this in a
special sublist?

There's no way to choose whether a regexp is case-sensitive on a
per-condition basis, only on a per-recipe basis.  So the above has to be
written something like:

        :0
        * ^Subject:.*test subject
        {
            :0 DB:
            * ! Herman [A-Z]
            maillist
        }

(Note that the trailing plus on the second condition is superfluous, as
it doesn't affect the 'truth value' of the regexp: the regexp would
have matched with the plus if and only if it would have matched without
the plus.)


Philip Guenther

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