Regular expressions pcre2 · Common patterns
URL slug
Match lowercase words joined by single hyphens.
^[a-z0-9]+(?:-[a-z0-9]+)*$
Official Regular expressions pcre2 documentation
More common patterns commands
All common patterns commands · Regular expressions pcre2 cheatsheet