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
/
^(?=.{3,30}$)[A-Za-z0-9]+(?:\s[A-Za-z0-9]+)?$
/
gm
Input 1
New
Mark Twain Michael Smith New Name9012345678901234567890 New Name90123456789012345678901
Substitution
Mark Twain Michael Smith New Name9012345678901234567890 New Name90123456789012345678901