Skip to content

Instantly share code, notes, and snippets.

@gkweb
Last active April 19, 2021 05:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gkweb/8cef04d58a74a702770f7480e20e55fd to your computer and use it in GitHub Desktop.
Save gkweb/8cef04d58a74a702770f7480e20e55fd to your computer and use it in GitHub Desktop.
Pointhacks ultimate URL validation
const validateUrl = /(https?\:\/\/([\w\-]+)?.?pointhacks.com(.au)?)/gi
// In use
validateUrl.test('https://broken.com')
validateUrl.test('https://working.pointhacks.com.au')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment