procmail
[Top] [All Lists]

Re: regex syntax question

2004-03-01 12:28:42
in message 
<Pine(_dot_)LNX(_dot_)4(_dot_)44(_dot_)0403011223020(_dot_)14567-100000(_at_)ns1(_dot_)mainelinesys(_dot_)com>,
wrote Curtis Maurand thusly...

given the following domain name: erx54843rx.com

If I've understood the docs correctly, I should be able to catch this 
with: erx[0-9]{1,5}rx\.com

So the rule would read:

:0 B:
* erx[0-9]{1,5}rx\.com
junkmail

Correct?

The procmailrc(5) lies when it says "... regular expressions are
/completely compatible/  to  the  normal  egrep(1)  extended regular
expressions."

For one thing, procmail regex engine does not have zero width word
boundary assertion.  And in your case, it does not have support for
pattern range like above.

Try this for pattern part related to number:

  [0-9][0-9]?[0-9]?[0-9]?[0-9]?



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