Return to Snippet

Revision: 9003
at October 17, 2008 03:22 by mamoo


Initial Code
Regex matchRegex = new Regex(@"[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9_\-\.]+\.[a-zA-Z]{2,5}");            
MatchCollection matches  =
	matchRegex.Matches("[email protected], [email protected],[email protected]");
if ( matches.Count > 0) 
{
	for ( int i = 0; i <>
	{
		// You can process the email matched 
		// for example you can check if it's a real email address or not.
		// by pinging the mail provider.
		ProcessEmailAddress(matches[i].Value);
	}
}

Initial URL
http://cairocafe.blogspot.com/2006/05/regex-validating-csv-email-addresses.html

Initial Description


Initial Title
Validate email list through Regex

Initial Tags
regex, email, c

Initial Language
C#