I have variables which represent email subject with these strings:
Snap: Processor
'ir.basisswap-1702|sydney-ir.basisswap-ricsxml-location_mapping' for
'20181231' failed [Production2]
and Snap: 'ir.broker.caplet.vol' RBS data valucheck failed [production]
Desired output:
I want to get values between Snap: and failed
Processor 'ir.basisswap-1702|sydney-ir.basisswap-ricsxml-location_mapping' for '20181231' and 'ir.broker.caplet.vol' RBS data valucheck
regex1 = r'Snap:\s*(\S+)'
a=re.findall(regex1 ,mail["Subject"])
Actual output:
Processor for first and ir.broker.caplet.vol for second