procmail
[Top] [All Lists]

debugging \<(xxx|yyy|zzz)\>

2004-05-28 13:31:51
I've tried various regex to limit a match to just the words
I'm looking for.  Using the obvious:

SPAMSCORE = "MSGID,NOBODY"
:0
*  1^1 SPAMSCORE ?? ()\<(MSGID|NOBODY)\>
*  1^1 SPAMSCORE ?? ()\<(MSGID|SUBJ|BODY)\>
{}

I get:

procmail: Assigning "SPAMSCORE=MSGID,NOBODY"
procmail: Score:       1       1 "()\<(MSGID|SUBJ|NOBODY)\>"
procmail: Score:       1       2 "()\<(MSGID|SUBJ|BODY)\>"

I expect a score of 2 on the first condition.

I get the same result if I add ^/$ anchors like this:
  (^|\<)( ... )(\>|$)  or  (^^|\<)( ... )(\>|^^)

From tidbits gleaned from this list, I've tried LOTS of variations on
   (.*\<)?( ... )(\>.*)?  or  \>(.*\<)?( ... )(\<.*)?\<
all of which are too restrictive or too liberal.

The depth of my misunderstanding is such that I really can't see why
the obvious, first form fails; why doesn't \<(xxx|yyy|zzz)\> become:

\<xxx\> or \<yyy\> or \<zzz\> 

and if it does, why don't each of those match their respective
portions of "xxx,yyy"?  Does the procmail scan "eat" the ',' once
it's seen "xxx," so it's not available to match ",yyy"? 

In any case, can someone straighten me out on the correct way to specify
a set of bounded words?

TIA,

Jim

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