procmail
[Top] [All Lists]

Re: block mail by compairing word in subject

2005-04-29 05:08:35
On Fri, Apr 29, 2005 at 08:58:42PM +1000, Peter Jones wrote:

d'oh!

Don't sweat it.  You learned something; that's what's important.

On Thu, 28 Apr 2005 10:39 pm, Dallman Ross wrote:
The regex "+" matches "one or more."  One is enough.  It will
be matched.

But if I'm reading your email correctly (and anything is possible
at this point) the pattern you are using in test2.rc is this one:

* $ SOMEHEADER ?? :.*\/[^$SPACE].*

which sets $MATCH to [first_nonspace_character] followed by .*
(which can, of course, match [nothing].)  That was why I was
talking about changing from your original version . . .

Okay, I see now.  Yes, about that, you are quite correct.
I'd wrongly assumed you thought '+' would always *add* at
least one character to the prior regex.  Some people have
had that mistaken understanding before.  That is,

   X*  # zero or more X's
   X+  # one or more X's (but not 2 or more, as is sometimes
       # thought, the belief being that the original X
       # counted for one, and the '+' for the second and
       # any beyond.  But that's wrong)

with her bash solution, it was enough to give me the nudge to
dive into perl...  (One of my big character flaws is my continual
need to reinvent wheels! :-))

Otoh, I do wish I knew perl, but I don't.  I'd tend to keep
it out of procmail, still, however, on philosophical grounds
at least if not also for performance reasons.

-- 
dman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail