\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))
This pattern attempts to be practical. It makes no attempt to parse URLs according to any official specification. It isn’t limited to predefined URL protocols. It should be clever about things like parentheses and trailing punctuation.
- Annotations on Daring Fireball: A Liberal, Accurate Regex Pattern for Matching URLs

Share this annotation

Post to Basecamp Project Update Twitter Bookmark on Del.icio.us Send E-mail Post to a Blog Post to Backpack Post to Trac Post to Bugzilla Post to a Tumblr Update Friendfeed Posterous

paste in your blog
 
paste anywhere: IM, mail
 
give this link to a friend
 

Tags: nov_09, daringfireball.net, annotations
Comments are allowed
This copy is published

Note: "This copy is kept-secret" would mean its URL is not published, but anyone knowing its URL can still view it.