On 23-Dec-2006, at 14:23, Geoff Soper wrote:
I'm trying to match mails sent to 1234567(_at_)domain(_dot_)tld where the
username
is a 7 digit number. According to the procmail man page I can use
egrep
style regex patterns and on the egrep man page it is detailed how
to use
{n} to match a pattern n times.
the {} syntax is relatively new to egrep and is not part of procmail.
Therefore I'm trying to use the
following recipe:
* (^TO_|Delivered-To: 2-)[0-9]{7}(_at_)domain(_dot_)tld
This recipe doesn't work but the following looser one does:
* (^TO_|Delivered-To: 2-)[0-9]*(_at_)domain(_dot_)tld
I can't see why the first one isn't matching the 7 digits. Can someone
suggest why this is?
WS=" " #Space and tab
PHONEUSER="[0-9][0-9][0-9][0-9][0-9][0-9][0-9]"
* ^TO_$PHONEUSER(_at_)doamin(_dot_)tld
That'd be how I'd go about doing it.
--
Well I've seen the Heart of Darkness/Read the writing on the wall/and
the voice out in the desert/Was the voice out in the hall
____________________________________________________________
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