regex for url slug
match a url slug
A ‘slug' is the part that comes at the very end of a URL, and refers to a specific page or post. Usually a combination of word that separated with hyphen
This expression can be used to validate an url slug with only lowercase alphabet or numbers on each word.
For example, in https://github.com/geongeorge/i-hate-regex
, i-hate-regex
is the slug.
Cheatsheet
expr | usage |
---|
iHateRegex
by
geon