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
/
^(?:[Dd][- ]?)?\d{5}$
/
gm
Input 1
1
New
12345 D12345 D-12345 D 12345 d12345 d-12345 d 12345 asdf 1234 d1234 p12345
Substitution