lol Blasty I know exactly what you mean, you should see my regex for linkify url detection.
One sec I'll edit and post it...
Edit:
this is for most links (made from various examples around the web with some of my own modifications)
/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_()|'!:,.;]*[-A-Z0-9+&@#\/%=~_()|])/
this is for youtube (based on something from stackoverflow that I only slightly changed)...
/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/
there are some other routines I run after the matches, but they are trivial by comparison. It gives me a headache just looking at them lol.
07-Dec-2013 14:17:04
- Last edited on
07-Dec-2013 14:25:55
by
Indecent Act