I have a string which is a file name, examples:
'20220213-0000-FSC-814-SC_VIRG_REFBAL_PRES_NPMINMAX-v1.xml'
'20220213-0000-F814-SC_VIRG_REFBAL_PRES_NPMINMAX-v1.xml'
I want to find a string with re.search which corresponds to Fddd or FSC-ddd.
I have a regex like this:
type_match = re.search(r'(F(\d{3}))|(FSC-(\d{3}))', string)
Later after I have found for example FSC-814 , I want to get only the number from this found string, I used:
int(type_match.group(1))
but it does not work after I included or statement in the re.search