The perfect PHP clean url generator | Cubiq.org
Daring Fireball: A Liberal, Accurate Regex Pattern for Matching URLs
A common programming problem: identify the URLs in an arbitrary string of text, where by “arbitrary” let’s agree we mean something unstructured such as an email message or a tweet.