procmail
[Top] [All Lists]

Re: explain 5 characters of FROM_MAILER regexp?

1996-10-23 02:30:15
On Tue, 22 Oct 1996, John R. Ruckstuhl wrote:

The last part of the regexp is "$[^>]".  I'm confused.  Isn't "$" only
special (end-of-line anchor) when it's the last character of the
regexp?  What is supposed to be going on here?  And if this behavior is
different than that of egrep, could someone tell me where it is
documented?

(One of the great things about UNIX: everyone can - and does - define his 
own regular expresssions.)

Yes, it is different from normal egrep, and yes, it is documented in the 
same procmailrc(5) man page where you found ^FROM_MAILER.

procmail uses multiline matches by default. This means that ^ and $ match 
a newline, even in the middle of a regexp. Now you know this, you can 
easily interpret `$[^>]' as: `a newline followed by a line not starting 
with a >'.

--
Guy Geens <guy(_dot_)geens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be>: Ph.D. 
student at ELIS -- TFCG / IMEC 
Home Page: http://www.elis.rug.ac.be/ELISgroups/tfcg/staff/gg.html 
finger ggeens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be for PGP public keys (or use 
keyserver) 

I was born weird: This terrible compulsion to behave normally is the
result of a childhood trauma


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