procmail
[Top] [All Lists]

Re: Matching blank lines

1999-10-14 00:04:24
Alastair Irvine <alastair(_at_)atri(_dot_)curtin(_dot_)edu(_dot_)au> writes:
When I was using procmail v3.03, the following recipe matched the first
line, a blank line and the second line (at the start of the message):

 :AB
 * ^^Your "cron" job^()^/admin/lib/backup 0 mammoth

(It took me a while to figure out that I needed the () in there,
otherwise the ^^ token was recognised rather than two line-starts.) 

Under procmail v3.13, it won't match the blank line.  I've tried the
above regexp, ...job^^/adm and ...job$^$^/adm... but none of them match.
Any ideas?

Hmm, all four of the following worked for me:

lunen% cat mess
To: guenther
Subject: test message
From: guenther

foo

bar
lunen% cat rcfile
LOGABSTRACT = no
VERBOSE = on

:0 B
* ^^foo$$bar
{ }

:0 B
* ^^foo$^bar
{ }

:0 B
* ^^foo^$bar
{ }

:0 B
* ^^foo^()^bar
{ }

HOST
lunen% procmail ./rcfile < mess
procmail: [27063] Thu Oct 14 01:54:18 1999
procmail: Match on "^^foo$$bar"
procmail: Match on "^^foo$^bar"
procmail: Match on "^^foo^$bar"
procmail: Match on "^^foo^()^bar"
procmail: Assigning "HOST"
procmail: HOST mismatched "lunen.gac.edu"
procmail: Notified comsat: "guenther@:"
lunen% procmail -v
procmail v3.13.1 1999/04/05, Copyright (c) 1999, Stephen R. van den Berg
                                                        
<srb(_at_)cuci(_dot_)nl> 
...


Are you sure the text in the regexp is correct?  Could there be a blank
line before the `Your "cron" job' line?


Philip Guenther

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