i
Hate
Regex
Library
Cheatsheet
Community
Open playground
match a url slug
Regex title
View-only original
Remix in playground
JavaScript
Expression
/
Regular expression
^
[a-z0-9]
+
(?:
-
[a-z0-9]
+
)
*
$
^[a-z0-9]+(?:-[a-z0-9]+)*$
/
gm
g
global
i
ignore case
m
multiline
s
dot all
u
unicode
y
sticky
Test bench
Sample text
4 matches
best-way
best-d4y
my-1ife
@t-the-sky at-the--sky -
a
fly-
best-way best-d4y my-1ife @t-the-sky at-the--sky - a fly-
Structure
Railroad diagram
SVG
PNG
Embed
Live