Posted By

benrasmusen on 07/30/10


Tagged

url regular Expression


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

benrudolph
Tyster


URL Matching


 / Published in: Regular Expression
 

URL: http://daringfireball.net/2010/07/improved_regex_for_matching_urls

  1. (?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))

Report this snippet  

You need to login to post a comment.