using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
var s = "First, Last <email1@example.com>; First, Last <email2@example.com>;";
Regex regex = new Regex(@"<([^>]+)>");
foreach (Match m in regex.Matches(s)) {
Console.WriteLine(m.Groups[1]);
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CgpwdWJsaWMgY2xhc3MgVGVzdAp7CglwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCgl7CgkJdmFyIHMgPSAiRmlyc3QsIExhc3QgPGVtYWlsMUBleGFtcGxlLmNvbT47IEZpcnN0LCBMYXN0IDxlbWFpbDJAZXhhbXBsZS5jb20+OyI7CgkJUmVnZXggcmVnZXggPSBuZXcgUmVnZXgoQCI8KFtePl0rKT4iKTsKCQlmb3JlYWNoIChNYXRjaCBtIGluIHJlZ2V4Lk1hdGNoZXMocykpIHsKCQkJQ29uc29sZS5Xcml0ZUxpbmUobS5Hcm91cHNbMV0pOwoJCX0KCX0KfQ==