I have a python string that comes in a standard format string and i want to extract a piece of that string.
The string come as such:
logs(env:production service:FourDS3.Expirer @Properties.NewStatus:(ChallengeAbandoned OR Expired) @Properties.Source:Session).index(processing).rollup(count).by(@Properties.AcsInfo.Host).last(15m) > 60
I want to extract everything between logs()
, that is i need to get this env:production service:FourDS3.Expirer @Properties.NewStatus:(ChallengeAbandoned OR Expired) @Properties.Source:Session
I have tried the below regex but it's not working:
result = re.search('logs((.+?)).', message.strip())
return result.group(1)
result = re.search('logs((.*?)).', message.strip())
return result.group(1)
Can someone please help me ?