using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
var input = "\"one@tw;,.'o\"@hotmail.com;\"some;thing\"@example.com;hello@world";
var mm = Regex.Matches(input, "((?:[^@\"]+|\"[^\"]*\")@[^;]+)(?:;|$)");
foreach (Match m in mm) {
Console.WriteLine(m.Groups[1].Value);
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CgpwdWJsaWMgY2xhc3MgVGVzdAp7CglwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCgl7CgkJdmFyIGlucHV0ID0gIlwib25lQHR3OywuJ29cIkBob3RtYWlsLmNvbTtcInNvbWU7dGhpbmdcIkBleGFtcGxlLmNvbTtoZWxsb0B3b3JsZCI7CgkJdmFyIG1tID0gUmVnZXguTWF0Y2hlcyhpbnB1dCwgIigoPzpbXkBcIl0rfFwiW15cIl0qXCIpQFteO10rKSg/Ojt8JCkiKTsKCQlmb3JlYWNoIChNYXRjaCBtIGluIG1tKSB7CgkJCUNvbnNvbGUuV3JpdGVMaW5lKG0uR3JvdXBzWzFdLlZhbHVlKTsKCQl9Cgl9Cn0=