fork download
import re
texts = ['20220213-0000-FSC-814-SC_VIRG_REFBAL_PRES_NPMINMAX-v1.xml',
'20220213-0000-F814-SC_VIRG_REFBAL_PRES_NPMINMAX-v1.xml']
pattern = r'F(?:SC)?-?(\d{3})'
for text in texts:
	match = re.search(pattern, text)
	if match:
		print (match.group(1))
	
	
Success #stdin #stdout 0.03s 9592KB
stdin
Standard input is empty
stdout
814
814