Skip to content

Instantly share code, notes, and snippets.

url = %r{
^
([A-Za-z]*) # scheme (e.g. http)
:
(?:
// # mailto: and news: URLs do not require forward slashes
)?
([0-9.\-A-Za-z@]*) # domain (e.g., www.regexml.org)