KGIII / pino-twitter

Automatically exported from code.google.com/p/pino-twitter
GNU Lesser General Public License v3.0
0 stars 0 forks source link

[patch] Improvement for the regex detecting urls #277

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I have noticed an issue with this status: http://identi.ca/notice/34109920
The closing ) is linked within pino, which is incorrect.

Here is a proposal for improving the regex detecting the urls within
statuses/notices:

urls = new
Regex("((https?|ftp)://([A-Za-z0-9+&@#/%?=~_|!:,.;]*)([A-Za-z0-9+&@#/%=~_|$]))")
;

Still not perfect as it doesn't take into account urls containing () (eg.
wikipedia's).

Hope this helps.

Cheers,
Julien

Original issue reported on code.google.com by Valro...@gmail.com on 30 May 2010 at 2:15