Skip to content

Instantly share code, notes, and snippets.

(?x)
\b
( # Capture 1: entire matched URL
(?:
[\w-]+: # URL protocol and colon
(?:
/{1,3} # 1-3 slashes
| # or
[[:alpha:][:digit:]] # Single letter or digit
# (Try not to match, say "URI::Escape")