I have a file where each line contains a string that represents one or more email addresses. 
Multiple addresses can be grouped inside curly braces as follows:

`{name.surname, name2.surnam2}@something.edu` 

Which means both addresses `name.surname@something.edu` and `name2.surname2@something.edu` are valid (this format is commonly used in scientific papers).

Moreover, a single line can also contain curly brackets multiple times. Example: 

```
{a.b, c.d, e.f}@uni.somewhere, {x.y, z.k}@edu.com

```

results in:

```
a.b@uni.somewhere 
c.d@uni.somewhere 
e.f@uni.somewhere
x.y@edu.com
z.k@edu.com

```

Any suggestion on how I can parse this format to extract all email addresses? I'm trying with regexes but I'm currently struggling.