I'm trying to extract multiple Emails from string. I'm using this regex:
re.findall(r'[\w\.-]+@[\w\.-]+(?:\.[\w]+)+', text)
It works fine, but sometimes in text Email names with the same domain are grouped in curly brackets:
{annie,bonnie}@gmail.com
So my question is how properly to parse it and extract as separate emails:
annie@gmail.com, bonnie@gmail.com?
I've tried to modify regex to take into account brackets and comma, following with simple function, but in that case I get a lot of garbage from string.
Any help appreciated.