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?[1-9][0-9]*_[A-Z]+-[0-9]{3}$
/
gm
Input 1
1
New
ABC_DE-001 is invalid abc is invalid (only alphabets) 0_DE-001 is invalid (1 zero before underscore) 000_DE-001 is invalid (sequence of 3 consecutive zeroes) 00_DE-001 is invalid (sequence of 2 consecutive zeroes) 01_DE-001 is valid (0 followed by some other number is valid) 10_DE-001 is valid (starts with 1) 100_DE-001 is valid (starts with 1