Rocket Ray wrote
How would you write a condition like that, i.e., if that phrase is the
Subject:, that's okay, but /dev/null the mail if it's in any other
header?
How would this sound:
* ^([^S][^u][^b][^j][^e][^c][^t]|[^:]?[^:]?[^:]?[^:]?[^:]?[^:]?\
|[^:][^:][^:][^:][^:][^:][^:][^:]*):.*\<phrase(\>|$)
/dev/null
In the second alternative, there must be exactly one "[^:]?" less than
there are letters in "Subject", and the third alternative must have
exactly one [^:] more than there are letters in "Subject". If one can
live with sloppy matching, one can replace every [^:] in the recipe
with a period. This would make the recipe more readable.
This is ugly, yes, but it should work. The idea is that any header
with a name shorter or longer than "Subject" is checked. Any header
except Subject: whose name is as long as "Subject" is checked too.
Antti-Juhani
--
... MS-DOS is universally considered unreal.
(The Jargon File 4.0.0)