See this pattern:
^*([A-Z]{2,3}\-[0-9]{4}).*
Tested on
Rad Software Regex Designer[
^] and this set of records:
MH-9940
NH-1940
AGV-9Az0
FG-5940
MZ-92X0
AHV-9930
with
IgnorePatternWhiteSpace
and
Mulitline
set to
TRUE
.
Returns:
MH-9940
NH-1940
FG-5940
AHV-9930
Is that what you're looking for?
Many useful information you'll find here:
http://www.regular-expressions.info/reference.html[
^]