Skip to content

Instantly share code, notes, and snippets.

@ys
Created September 28, 2011 09:12
Show Gist options
  • Save ys/1247437 to your computer and use it in GitHub Desktop.
Save ys/1247437 to your computer and use it in GitHub Desktop.
url ruby regexp
/\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/?)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s\`!()\[\]{};:\'\".,<>?]))/i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment