On Tue  1.May'01 at 19:20:47 +0200 wrote
 "Rado S." <[EMAIL PROTECTED]>:

> I have some messages with www/ftp URLs. To highlight them I use
> 
> ------ QUOTE BEGIN ------
> color body      black yellow '(ftp|www)(\.[^   ]+)+(/[^        ]*)*'
> color body      black white "[^\t ]+:([^\t ]*/[^\t ]*)+"
> color body      black green "(f|ht)tp://[^\t ]+"
> color signature red black
> ======= QUOTE END =======
> 
> This works in general.
> 
>       www.bla.org             -> yellow
>       host:www.what/bla/fasel -> white
>       http://www.doamin.bla   -> green
> 
> For all eMails it works, except for 1 !
> Try the above color definitions and have a look on the eMail attached !
> If you can, tell me ...
> 
> 1. why isn't the sig recognized and coloured right ?

>From the source-code signatures are recognized and separated by "-- ".
 Why is this so ? Is it a RFC ?

> 2. why is the URL at the bottom not green but white ???
> 
> When I comment out the white definition and restart mutt, the URL turns
> green !!!

It takes the _earliest_ matchposition rather than the biggest or first/last
matching string. Only if match position is same it goes for size and finally
it takes the last in order.

I had to change the white pattern to:

color body      black white "[a-z0-9]+:([^\t ]*/[^\t ]*)+"

to have the URL enclosed in <> to appear green.

------ QUOTE BEGIN ------

> From [EMAIL PROTECTED] Tue Apr 24 17:53:11 2001
> Date: Wed, 4 Apr 2001 13:43:37 -0600 (MDT)
> From: Rado <[EMAIL PROTECTED]>
> To: Rado <[EMAIL PROTECTED]>
> Subject: Metaserver.
> 
> Rob
> 
> --
> 
> You guys are so unhip it's a wonder your bums don't fall off.
> 
>   - Zaphod Beeblebrox - The Hitchiker's Guide to the Galaxy
> 
> --
> 
> <http://www.ee.ualberta.ca/~kaut>
> Electrical Engineering 1998
> University of Alberta
> 

======= QUOTE END =======

-- 
Rado S.                 eMail: [EMAIL PROTECTED]
----------------------------------------+-------------------------------------
Message is based on my knowledge:       | So much to do, and only so little
I'm not omniscient, take care!          | time, no mercy, no hope.

Reply via email to