Skip to content

Instantly share code, notes, and snippets.

@schwern
Created November 27, 2009 23:16
Show Gist options
  • Save schwern/244280 to your computer and use it in GitHub Desktop.
Save schwern/244280 to your computer and use it in GitHub Desktop.
qr{
\b
(
# scheme or schemeless
([\w-]+://? | www[.])
# anything but whitespace or brackets
[^\s()<>]+
# letters and numbers in parens
# or anything but punctuation and whitespace
# or a close paren
(?: \([\w\d]+\) |
([^[:punct:]\s] | /)
)
)
}x;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment