Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^5$
/
gm
Unit Tests
1,2,3,4
→ regex does match
-1,2,-3,4,-5
→ regex does match
1000,100,10,1,0
→ regex does match
5
→ regex does match
2,3,
→ regex does not match
,,,
→ regex does not match
-,-
→ regex does not match
3-2,4-5
→ regex does not match
apple,banana,pear
→ regex does not match
-50,up
→ regex does not match
down,20
→ regex does not match