On Sat, Jun 29, 2002 at 11:12:41AM +0100, Vaclav Barta wrote:
> I agree the new version looks nicer and easier to read, but is it
> *meant* to be read?

Yes.  (IMO)

| > Personally, I want to parse it, and the whitespace just gets in
| > the way...  I know it's *possible* to parse it, but I'm lazy

I have a pair of message-hooks in mutt to show the header IFF some
test was triggered.  Thus I need to "parse" it too.  

message-hook '~A' "ignore X-Spam-Status"
# single-line version , 2.20
message-hook '~h X-Spam-Status:.*tests=[^\ ]' "unignore X-Spam-Status X-Spam-Flag"
# multi-line version , 2.30  (tests=none)
message-hook '~h tests=[^[:space:]n]' "unignore X-Spam-Status X-Spam-Flag"


It's not that hard, when your regex engine supports "multiline"
strings.  The Right Way (if you actually want to do more with it) is
to use a proper RFC2822/MIME parsing library.  The (legal) structure
of email messages is not exactly trivial.

-D

-- 

[Perl] combines all the worst aspects of C and Lisp: a billion different
    sublanguages in one monolithic executable.
It combines the power of C with the readability of PostScript.
        -- Jamie Zawinski
 
http://dman.ddts.net/~dman/

Attachment: msg06843/pgp00000.pgp
Description: PGP signature

Reply via email to