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
/
^([A-Z0-9]{3}[WTL])(TB)?+(?!LG)
/
gm
Input 1
1
New
Should capture ABCWTB|12345 ABCLTB|12345 FGHT|12345 AAAW|12345 B2BL|12345 XYZTTB|345345 Should not capture anything (these work) ABCLLG12345 FGHTLG12345 X2ZWLG12345 Should not capture anything (these don't work) ABCWTBLG12345 XYZTTBLG345345 F2HLTBLG345345
Extraction
Should capture ABCWTB|12345 ABCLTB|12345 FGHT|12345 AAAW|12345 B2BL|12345 XYZTTB|345345 Should not capture anything (these work) ABCLLG12345 FGHTLG12345 X2ZWLG12345 Should not capture anything (these don't work) ABCWTBLG12345 XYZTTBLG345345 F2HLTBLG345345