Skip to content

Instantly share code, notes, and snippets.

@ganey
Created April 14, 2015 10:45
Show Gist options
  • Save ganey/614c5f05d3e26c5a10e0 to your computer and use it in GitHub Desktop.
Save ganey/614c5f05d3e26c5a10e0 to your computer and use it in GitHub Desktop.
Domain Regex
Works in the laravel regex as part of an array.
Covers with http,https and none.
requires a 2 letter domain extension.
/^((http|https)\:\/\/|)[\w+\.]+[\w]+$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment