procmail
[Top] [All Lists]

Re: Matches as folders

1999-04-21 06:33:06
On Wed, 21 Apr 1999 12:34:16 +0100, Lars Hecking
<lhecking(_at_)nmrc(_dot_)ucc(_dot_)ie> wrote:
era eriksson writes:
On Wed, 21 Apr 1999 11:42:55 +1000, Bek Oberin
* From: \/[^(_at_)]+
This is perfect. My only comment is that you obviously want to be sure
 ObNitpicking: shouldn't the second condition line be
 * From: ()\/[^(_at_)]+

Huh? Why? The empty parens are necessary only to "disarm" a leading
backslash, but the backslash here is not a leading backslash so there
should be no need. Or am I missing something?

For a general solution, you'd probably want to match arbitrary amounts
of whitespace after the colon, in which case you have to take care to
match a non-whitespace character after the \/ grab operator:

    * ^From:[   ]*\/[^  @][^(_at_)]*

(or even simply ...[^   @]+) but I understand that in this case, the
From: field is consistently formatted to always have a single space
(ASCII 32) after the colon. (Adjust as indicated if not.)

/* era */

The whitespace between the square brackets consists of a space and a
tab, in any order, as usual. (I should define an abbrev for this.)

-- 
.obBotBait: It shouldn't even matter whether     <http://www.iki.fi/era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>
 * Sign the European spam petition! <http://www.politik-digital.de/spam/en/> *

<Prev in Thread] Current Thread [Next in Thread>