On Fri, Jul 23, 2004 at 10:00:22PM -0600, Justin Gombos wrote:
* David W. Tamkin <dattier(_at_)panix(_dot_)com> [2004-07-23 19:21]:
However, these two run into the leading slash problem:
* ! \<scr\>
* HB ?? ! \<ex.?500\>
and should be written
* ! ()\<scr\>
* HB ?? ! ()\<ex.?500\>
if you want \< to act as a match to a non-word character.
I never heard of this problem! I have been running scripts for years
such that a regex conditional begins with "\". Here is a script that
is being used to handle old/malconfigured mailing lists, or lists that
came as digests (and later get reprocessed through formail):
# To/From mailing lists
* MATCH ?? ()\/[^(_at_)]+
So this recipe should be failing on the second conditional? Maybe it
is and I didn't test it well. This might explain why (some?)
urine-test messages get past this recipe and end up in my default
Also, notice the "()" prefix on the third conditional. I was only
copying someone else, and didn't know what the parenthesis were for.
So what's really happening in the absense of "()"?
David has implied above what happens in the absense of some manner of
quoting the initial slash: it essentially gets eaten, and in his
example "\<" loses its meaning as a special token and becomes
merely "<" (and the char got quoted). You also should remember that
"<" or ">" (unquaoted) directly after the "??" has a different meaning
from anywhere later on in the condition, where they revert to their
literal meaning and match their like symbols. (But at the beginning,
they act as an size operator against the entire message.)
That said, there is no such issue in the recipes you quoted above.
There is no initial slash after "??" to be found that would need
quoting but doesn't have it. So your recipe would be expected to work.
procmail mailing list Procmail homepage: http://www.procmail.org/