Created
December 13, 2017 19:18
-
-
Save sk22/95db67c3231448b5b7e9f5d2be0d82d0 to your computer and use it in GitHub Desktop.
Regex to match a slug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^[a-z0-9]+(?:-[a-z0-9]+)*$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Live Example and Source