Skip to content

Instantly share code, notes, and snippets.

@sk22
Created December 13, 2017 19:18
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 sk22/95db67c3231448b5b7e9f5d2be0d82d0 to your computer and use it in GitHub Desktop.
Save sk22/95db67c3231448b5b7e9f5d2be0d82d0 to your computer and use it in GitHub Desktop.
Regex to match a slug
^[a-z0-9]+(?:-[a-z0-9]+)*$
@niketpathak
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment