I've tried various regex to limit a match to just the words
I'm looking for. Using the obvious:
SPAMSCORE = "MSGID,NOBODY"
* 1^1 SPAMSCORE ?? ()\<(MSGID|NOBODY)\>
* 1^1 SPAMSCORE ?? ()\<(MSGID|SUBJ|BODY)\>
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?
procmail mailing list