procmail
[Top] [All Lists]

Re: regex problem with '*'

2000-02-17 14:41:44
On Thu, Feb 17, 2000 at 08:51:57PM +0100, 
michael(_dot_)renner(_at_)gmx(_dot_)de wrote:
Why the [: ] ?

I saw it in the procmailex manpage:
              * ^From[ :].*print-server

This would be because messages in mbox format (and posibbly others?) will have
two "From" headers, one that looks like "From
address(_dot_)that(_dot_)sent(_dot_)message(_at_)sending(_dot_)host(_dot_)tld 
date" (usuaully denoted in
documentation as as the "From_ header") and one that looks like "From: User
Name as formatted by sender's mua" (denoted as "From:") The format of From:
can vary (Usually something like "Real Name <address(_at_)host(_dot_)tld>"), 
but always
has the colon and space.)
That regexp would match both. Since you're looking at the subject, which there
should be only one, you don't need the [ :], you can just do "^Subject: ADV"

(someone correct me if my assesment is off. As someone else said earlier in
the month, I'm writting this to test my own assumptions, to learn.)

-- 
Andrew Edelstein                email: andrew(_at_)infonent(_dot_)com
Core Services Division          voice: 408-278-4430
Infonent.com, Inc.
San Jose, CA

All opinions or statements are my own and are not official statments of either
Comms People, Inc. or Infonent.com, Inc./ Ideaflood, Inc.

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