procmail
[Top] [All Lists]

Re: procmail regex style using Or construct

2009-02-19 11:38:08
On Thu, 19 Feb 2009, o(_dot_)nash(_at_)cs(_dot_)ucc(_dot_)ie wrote:
This egrep expression does the trick but does not translate to procmail.
egrep ^Date:.*\ \(1\|2\|3\|4\|5\|6\|7\)\ $MNTH\ $YR sent-mail

Um, it *should*. Perhaps the issue is that you are using the
backslash where you should not be using one. Procmail regex's
take the special characters ("(", "|", "[", et al) and give them their special meaning UNescaped. So in procmail the above regex would be:

* ^Date:.* (1|2|3|4|5|6|7) $MNTH $YR

...or...

* ^Date:.* [1-7] $MNTH $YR

Note: On some systems, to make $MNTH work, you need to insert
a backslash *after* the $ sign....

* ^Date:.* [1-7] $\MNTH $\YR


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