Skip to content

Instantly share code, notes, and snippets.

@chrisgoddard
Created October 25, 2016 17:28
Show Gist options
  • Save chrisgoddard/df8c5a772bc9e1b2e2bb6909763792a2 to your computer and use it in GitHub Desktop.
Save chrisgoddard/df8c5a772bc9e1b2e2bb6909763792a2 to your computer and use it in GitHub Desktop.
Useful regex patterns
Extract domain from string (with or without protocol)
[?:http(s)?:\/\/]?([a-z0-9\-]+\.?[a-z0-9\-]+\.[a-z]{2,3})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment