C# String İçinde Geçen Mail Adreslerini Çekme

String text = "Emrah Kahraman (EHero) (emrah@deneme.com)";
Regex emailRegex = new Regex(@"\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*",
RegexOptions.IgnoreCase);
MatchCollection emailCollection = emailRegex.Matches(text);

StringBuilder sb = new StringBuilder();

foreach (Match email in emailCollection)
{
Console.WriteLine(email.Value);
}

« »