Skip to content

Instantly share code, notes, and snippets.

@yohangdev
Created June 20, 2019 14:28
Show Gist options
  • Save yohangdev/45016ab927157b0046d4fbe5f9573b2d to your computer and use it in GitHub Desktop.
Save yohangdev/45016ab927157b0046d4fbe5f9573b2d to your computer and use it in GitHub Desktop.
Regular Expression (RegEx) Cheatsheet
// URL
const reg = /^(http:\/\/|https:\/\/)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment