[100413] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: procmail statement

daemon@ATHENA.MIT.EDU (Thomas Ribbrock \(Design/DEG\))
Fri Nov 20 12:16:37 1998

Date: Fri, 20 Nov 1998 17:12:55 +0000
From: "Thomas Ribbrock \(Design/DEG\)" <argathin@iname.com>
To: Red Hat Users List <redhat-list@redhat.com>
Mail-Followup-To: Red Hat Users List <redhat-list@redhat.com>
In-Reply-To: <Pine.LNX.3.96.981120085225.2043D-100000@gypsy.rubyriver.com>; from John D. Hardin on Fri, Nov 20, 1998 at 08:55:51AM -0800
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

John D. Hardin writes:
> On Fri, 20 Nov 1998, Thomas Ribbrock (Design/DEG) wrote:

> > An alternative way for writing that line would be:
> > 
> > * ^Subject:.*[tT][eE][sS][tT]
> > 
> > That'll definitely match all possible combinations of upper and lower case.
> 
> Procmail REs are not case-sensitive, and that will match phrases as well.

D'oh! Yep, I overlooked that ":0D:" at the beginning of my case sensitive
receipe... You're right, of course - as per default, procmail is case
insensitive. WRT phrases - I thought Zoki might want that... :-}

 
> Try this:
> 
> * ^Subject:  *test
> -----------^^ two spaces
> 
> Which means:
> Match "Subject: " at the beginning of the line,
> followed by zero or more extra spaces
> followed by "test"
[...]
> NB: It's a damn shame that Procmail's RE parser doesn't understand \s
> or + at this time.

?? According to man page (man procmailrc), this should work as well:

* ^Subject +test

<quote source="procmailrc man page">
  Extended regular expressions
     The following tokens are known to both the procmail internal
     egrep  and  the  standard  egrep(1)  (beware that some egrep
     implementations include other non-standard extensions):

[...]

     a*        Any sequence of zero or more a's.

     a+        Any sequence of one or more a's.

[...]

</quote>

...and I do indeed have working receipes which rely on the +.

Regards,

Thomas
-- 
             "Look, Ma, no obsolete quotes and plain text only!"

     Thomas Ribbrock | http://www.bigfoot.com/~kaytan | ICQ#: 15839919
   "You have to live on the edge of reality - to make your dreams come true!"


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post