John Conover asked a question about ":(.*[a-zA-Z])?" in the expansion of ^TO,
which I answered, and the John followed up,
| Thanks for clearing that up Dave.
"Dave"? Anyhow,
| So what is ^TO and ^TO_? I don't seem to have any docs on them ...
Huh? John, ^TO is what you just asked about. ^TO_ is a variant that Stephen
has recently introduced. You do have docs on ^TO: the very section of the
procmailrc(5) man page you were quoting before. If your version of procmail
is recent enough to support ^TO_, it is described in the same place. Here's
the excerpt from that man page as it comes with version 3.11pre4:
If the regular expression contains `^TO_' it will be sub-
stituted by `(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-
Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)',
which should catch all destination specifications
containing a specific address.
If the regular expression contains `^TO' it will be sub-
stituted by `(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-
Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)', which
should catch all destination specifications containing a
specific word.
So ^TO hasn't changed after all. I thought it now forbade matches to strings
that end in digits or underscores, but it allows them. ^TO_ will not match
a string that ends in a letter of the alphabet, a digit, an underscore, a
period, or a hyphen.