<<< Date Index >>>     <<< Thread Index >>>

Re: colours and quotes and regex libs? (was: Re: colours and quotes)



* David Yitzchak Cohen <lists+mutt_users@xxxxxxxxxxxxxx> [2004-05-28 14:29 
-0400]:
> On Fri, May 28, 2004 at 09:32:37AM EDT, Nicolas Rachinsky wrote:
> > Hmm, I have some lines like this in my .muttrc, and they all seem to
> > work fine:
> > color body brightblue default "[-a-z_0-9.+]+@[-a-z_0-9.]+"
> > 
> > I'm using:
> > Mutt 1.5.6i (2004-02-01)
> 
> Man, that sucks.  The newest version (at least) supports 1.4.x behavior
> again.  That's one less advantage to my own setup :-(

IIRC this worked all the time here.

> Can you try something like this just to be sure?  (The regex was imported
> from Perl, so feel free to change whatever's necessary to fix it.)
> 
> color body red default 
> '((http|https|ftp|gopher|finger):\/\/(.+?))(?="|\s|&gt;|\))'

Hmm, my mutt doesn't accept +? and (?=. But my (not very good) url
regexp works fine for (many) URLs which are only a part of a line.
color body brightblue   default "((ftp|https?)://|(ftp|www[-a-z0-9]*)\\.)[^ 
\t\r\n\"<>]*[^].,:;!)? \t\r\n<>\"]"

I'm too lazy to think about how to convert your regexp to something my
mutt accepts, and I'm too lazy to find (or produce) a test case.

Sorry,
Nicolas