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
/
^[a-zA-Z0-9](?:[ .:,\/_-](?![ .:,\/_-])|[.:,\/_-] [a-zA-Z0-9]|[a-zA-Z0-9]+)*$
/
gm
Input 1
Should pass: abcd a:b a:b:c a:b c:d a: b Should not pass: a::b :abc ::abc a:b :de a: :b Uncertain: a:_b
Substitution
Should pass: abcd a:b a:b:c a:b c:d a: b Should not pass: a::b :abc ::abc a:b :de a: :b Uncertain: a:_b