(?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`!()\[\]{};:'".,<>?«»“”‘’]))
you are viewing a single comment's thread
view the rest of the comments
[–] 43 points 8 months ago* (last edited 8 months ago) (5 children)

Looks like an URL matcher of some sorts, not limited to HTTP. Kudos for handling parentheses as valid URL characters.

  • source
  • hideshow 5 child comments
  • [–] 25 points 8 months ago (4 children)