procmail
[Top] [All Lists]

Re: procmail regex style using Or construct

2009-02-19 12:10:59
* Charles Gregory wrote:
* ^Date:.* (1|2|3|4|5|6|7) $MNTH $YR

...or...

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

You need a "$" at the beginning of the line to tell procmail that you
want variable substitution - otherwise "$MNTH" will just be matched by
end of line, M, N, T, H.

* $ ^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

$\VAR escapes all regexp constructs in VAR (see man procmailrc). If MNTH
is just "Feb", it doesn't matter, but if it's "(Jan|Feb|Mar)", $\MNTH
will be "\(Jan\|Feb\|Mar\)", which is probably not what you want in a
condition line.

/HW
____________________________________________________________
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