Re: colours and quotes and regex libs? (was: Re: colours and quotes)
On Fri, May 28, 2004 at 04:03:06PM -0400, Ronald J Kimball wrote:
> Here's a mutt-friendly regex, based on David's Perl regex, that seems to do
> well:
>
> color body brightblue default \
> '(https?|ftp|gopher|finger):\/\/([^"'"'"' \t\n)>.,!?&]|[.,!?][^"'"'"'
> \t\n)>.,!?&]|&([^g]|$)|&g([^t]|$)|>([^;]|$))+'
>
Woops! There's a flaw in that command that became apparent when I received
a URL containing the letter n! :D Apparently in mutt "\n" is a newline,
but '\n' is an n. Here's the command again, with proper quoting:
color body brightblue default \
"(https?|ftp|gopher|finger)://([^"'"'"' \t\r\n)>.,!?&]|[.,!?][^"'"'"'
\t\r\n)>.,!?&]|&([^g]|$)|&g([^t]|$)|>([^;]|$))+"
Ronald