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
/
^(?=.{0,25}$)[+#]?\d*(?:X*|\*?)$
/
gm
Input 1
1
New
The regex should match any given number: 012345 +12345 #1234525 But also match for strings with a X in it. 12345X 12345XX 1234XXXXXX XXXXXX also 12345* Not allowed 1234*X 1234X* 1234** 1234X* 12345*X
Substitution
The regex should match any given number: 012345 +12345 #1234525 But also match for strings with a X in it. 12345X 12345XX 1234XXXXXX XXXXXX also 12345* Not allowed 1234*X 1234X* 1234** 1234X* 12345*X