Skip to content

Instantly share code, notes, and snippets.

@hunty
Last active June 19, 2018 10:13
Show Gist options
  • Save hunty/92723104b06b5725cb7ad808b85d9085 to your computer and use it in GitHub Desktop.
Save hunty/92723104b06b5725cb7ad808b85d9085 to your computer and use it in GitHub Desktop.
URL validation regexp rule including modern zones like .museum
^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,20}(:[0-9]{1,5})?(\/.*)?$
@hunty
Copy link
Author

hunty commented Jun 19, 2018

up to 20 symbols in first domain zone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment