Skip to content

Instantly share code, notes, and snippets.

@DownRangeDevOps
Created January 10, 2015 21:09
Show Gist options
  • Save DownRangeDevOps/e047f0d5f70955ab1ba9 to your computer and use it in GitHub Desktop.
Save DownRangeDevOps/e047f0d5f70955ab1ba9 to your computer and use it in GitHub Desktop.
// Remove the ^$ to match all domains in a string
^(?!\-)(?:[a-zA-Z\d\-]{0,62}[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63}$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment