Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(?:\d{4,5}\w{0,2}(?:\.\w{1,2})?|\w{3}-\d{6})$
/
gm
Test String
New
00000 00000.0 00000.00 00000.X 000000 000000X 00000X 00000X.0 00000X.0X 00000X0.0 00000XX.0 0000X.0 XXX-000000
Substitution
Processing...