Re: Prop: make URL's clickable



Ok, sorry for the double post.  I should have looked at this longer before
posting.  I would now like to suggest this as the regex:

((ht|f)tps?://[^][:blank:]\\)>\r\n]+)

Try clicking on these URLs to see the mangled URLs:

(http://www.linux.org)
<http://www.balsa.net>
[http://www.slashdot.org]

All of them work properly with the above suggested regex.

julian



On Sun, 13 May 2001 10:56:23 Julian M Catchen wrote:
> I have tried out the URL patch and I like it.  It works well. 
> 
> There is a small problem that I noticed.  You used the following regex to
> match the URLs: 
> 
> ((ht|f)tps?://[^[:blank:]\r\n]+).  
> 
> Unfortunatley, if there is a ")" or "]" at the end of the url, it gets
> matched in the regex and the HTML page fails to be found because of the
> mangled URL.  So, to fix this you should add brackets and parantheses to
> regex, like this:
> 
> "((ht|f)tps?://[^[:blank:]\)\]\r\n]+)".  
> 
> Maybe consider adding all of the URL-illegal characters to this regex.
>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]