UrlRegex is a regex pattern designed originally by John Gruber for detecting URLs that occur among a blog of wild and crazy human-entered text.
It's not perfect, but the intent is to handle most common and uncommon scenarios.
Just clone the source and open the start.html in your favorite browser to see the Regex in action.
John Gruber is the originator of this regex. You can read his blog post for more background on how he developed it.
According to his blog post, he has released his original regex as public domain.
This project is also released as public domain, as-is, no warranties implied or expressed, etc. None of the commiters of this project are responsible for any harm (real or imagined) that may occur from the use of this pattern, code, or anything in this respository.
You may use this pattern and all code in this repository for all purposes except committing evil (crimes, harm, etc). You do not have to attribute your usage to anyone, though we think that you should probably give John Gruber a credit for his work in this area. At the least, send him an email or do a blog post and give him some link love.