using System.Text.RegularExpressions;
using System.IO;
string FileData = File.ReadAllText(fileName);
Regex emailregex = new Regex("(?<user>[^@]+)@(?<host>.+)");
MatchCollection matches = emailregex .Matches(FileData);
foreach (Match match in matches)
{
Console.WriteLine(match.Value.ToString());
}
No comments:
Post a Comment