procmail
[Top] [All Lists]

Re: Matching exactly 3 times on regexp

2005-01-04 10:56:05
On Tue, Jan 04, 2005 at 05:52:18PM +0100, kurtz wrote:
the following doesn't
work:

:0 Wf
* ^From: .*kurtz[0-9]{3}
| formail -I "Status: RO"


Neither reading the fine manual nor googling I have found a way
round. Any feedback will be very useful!

This one comes up fairly frequently.  Suggestion for the future
is to go to the searchable list archives at www.procmail.org
(kind of far down on the page is a link).  The answer is, that
is "extended" egrep syntax and is not supported in procmail.
Only "traditional egrep-py syntax (fixed in time about 1.5
decades ago or something) is supported.  Sorry.

You can work around this various ways.  One way is:


   NUMSET = '[0-9]'
   THREENUMS = "$NUMSET$NUMSET$NUMSET"

Btw, your test for recognizing "you" is probably a little too
relaxed.  You're likely to get a fair amount of spam and other
cruft into your archive.

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

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