Skip to content

Instantly share code, notes, and snippets.

@sajadshafizadeh
Last active December 21, 2015 21:29
Show Gist options
  • Save sajadshafizadeh/ebf7ef7cfcdb7d52db6a to your computer and use it in GitHub Desktop.
Save sajadshafizadeh/ebf7ef7cfcdb7d52db6a to your computer and use it in GitHub Desktop.
// Valid ---------------- without subdomain
www.example.com
http://example.com
http://www.example.com
https://example.com
https://www.example.com
// Valid ---------------- with subdomain
www.sub.example.com
http://sub.example.com
http://www.sub.example.com
https://sub.example.com
https://www.sub.example.com
// Invalid ----------------
/* all the rest
** even those urls which start with subdomain like this gist.github.com
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment