procmail
[Top] [All Lists]

Re: ^TO vs ^TO_ ?

1996-08-01 11:50:19
When I suggested to Martin Thompson,

| > Consider using the ^TO or (if your procmail is recent enough) ^TO_ token

doctor(_at_)netcom(_dot_)com asked,

| I've not noticed the ^TO_ token in the documentation.

It was just introduced in 3.11pre4 or maybe 3.11pre3.  If your version of
procmail is older, no, you wouldn't find it.

| What's the difference?

The string that follows ^TO or ^TO_ is supposed to be the beginning of a
word: ^TOann should not register a match if procmail finds "To: hannibal".
Accordingly, ^TO will not match a string that ends in a digit, a letter of
the alphabet, or an underscore.

Some mail aliases contain periods or hyphens.  You may or may not want to
allow the part after the period or the hyphen to count as a match.  In order
to provide a choice, ^TO_ is now available, and it is even pickier: it won't
match a string that doesn't match ^TO, and moreover it will not match a
string that ends in a hyphen or a period.

<Prev in Thread] Current Thread [Next in Thread>
  • ^TO vs ^TO_ ?, The Doctor {Who?}
    • Re: ^TO vs ^TO_ ?, David W. Tamkin <=