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
/
^(?:GB\d{2}[A-Z]{4}\d{14}|DE\d{20})|(?!DE|GB)[A-Z]{2}[A-Z\d]{13,}$
/
gm
Input 1
1
New
works as expected DE12312341212312312312 GB12ASDF12312312312311 this should match with fallback NO1212121212121 BG18RZBB91550123456789 this should not match with fallback: DE1231234121231 GB1231231231231