Skip to content

Instantly share code, notes, and snippets.

@bdbch
Created February 25, 2019 13:55
Show Gist options
  • Save bdbch/48739412bfafd360f623e25eb23a8844 to your computer and use it in GitHub Desktop.
Save bdbch/48739412bfafd360f623e25eb23a8844 to your computer and use it in GitHub Desktop.
regex for URL detection
?^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?((\/[a-z0-9\S]*)*)? ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment