procmail
[Top] [All Lists]

Re: Filter Question

2002-01-27 01:24:06
in message <20020126230050(_dot_)B8518(_at_)eric(_dot_)unixtechs(_dot_)org>, 
wrote Tim Holmes thusly...

I have other email address that are first name, last name, and so on.  So
how do I add those in there?  Would something like this be adequate?

*(tim(h|othy(.holmes)|.holmes))?|tdh)@(domain1|domain2).com

Would that line pull out emails sent to 

tdh@
tim@
timh@
timh.holmes@
timothy@
timothy.holmes@


there seems to be a redundancy w/ ".holmes" in your regex.  given
above names and your regex[0], how about[1]...

(tdh|tim(h|othy)?(\.holmes)?)@(domain[12])\.com
                  ^                ^
                  |----------------|
                           |
                           |
...and, do take care of escaping the "." where you mean it.
otherwise, it could develop in a bad habit and come back to bite in
you-know-where.


[0]  tim, your regex produces an id not listed in your examples:
"tim.holmes@".  and, that makes it easier for me to generate the
above regex.  otherwise, based solely on your examples, regex would
be...

(tdh|timh?|tim(h|othy)\.holmes)@(domain[12])\.com

...and now that "tim" appearing twice is bugging me... oh well.


[1]  yes, i did take "domain1|domain2" literally in my regex; sorry
i just couldn't pass it.


 - parv

--
 
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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