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]*)+$
/
gm
Input 1
1
New
Match -------- ABC123?A 1ABCA? ?2ABCD ? abc?d? but not ------ ABC123 ABC.?1D1 ABC(a)?1d
Substitution
Match -------- ABC123?A 1ABCA? ?2ABCD ? abc?d? but not ------ ABC123 ABC.?1D1 ABC(a)?1d