procmail
[Top] [All Lists]

Re: Distinguishing Case Egrep Matching

1999-04-06 10:24:47
On Tue, 6 Apr 1999, Ralph SOBEK wrote:

Hi!

Hello!

      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".

Actually, you'll want to sneak the "S" from "Smith into the regexp so that
it matches only on "MITH". See below.

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?

Try coming at it from the other direction:
:0BHD
* ^Subject:.*[tT][eE][sS][tT] [sS][uU][bB][jJ][eE][cC][tT]
* ! Herman S[A-Z]+
maillist

This will save to maillist those messages that have a 'test subject' as
the subject in any mix of upper and lower case, and without mentioning
"Herman S[A-Z]+" anywhere.  If you want that part to just be in the body
(for failure):
:0H
* ^Subject:.*test subject
{
  :0BD
  * ! Herman S[A-Z]+
  maillist
}

-jeff
----
If people are good only because they fear punishment and hope for reward,
then we are a sorry lot indeed.  -Albert Einstein

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