I am trying to find the correct RegEx pattern to allow to find word followed by either hyphen or space, followed by one or more all cap letters and numbers. These are in email subject lines that my program searches through. So they are not at the beginning of sentence.
Alliance-A071801
NRG-BN009
NRG -CC009
NRG CC009
COG- ARST2031
ETCTN-10186
NRG - LU005
This is what i've tried so far. But it doesn't grab all the options.
r'\w+[-|\s][A-Z]+[\d@]+'