procmail
[Top] [All Lists]

Re: body search (B ?? ...) & regex/scoring question

2002-03-05 17:36:44
parv_(_at_)yahoo(_dot_)com asked,

| can anybody tell me why would this not match ...
|
|   *  1^0 B ?? \<((minolta|maxxum|the).*[579]|(xt|50[05])si)\>
|
| ...this body (wrapped for email)...

|   I want to know the difference between the MINOLTA Dynax 7 and the \
|   MINOLTA Dynax 7 Limited edition.

| ...what am i doing wrong w/ the regex or the scoring?

It's in the regexp.  You didn't protect the leading slash, so procmail
interprets \< as

 \   end of whitespace
 <   literal left-side angle bracket

instead of

 \<   character that wouldn't be in a word

Solution: protect the leading slash with yet another slash (counterintuitive
to read, though, because one expects two backslashes to mean a literal
slash):

*  1^0 B ?? \\<((minolta|maxxum|the).*[579]|(xt|50[05])si)\>

or with an empty pair of parentheses (as most of us do it):

*  1^0 B ?? ()\<((minolta|maxxum|the).*[579]|(xt|50[05])si)\>

On a separate note it's much better to use 2147483647^0 than 1^0 as the
weight when all you're doing is trying to coax procmail into ORing instead
of ANDing, but that's not what you asked about.



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