AddaByte    Programmers' Script Repository
Free and low cost software.
spacer
Find out about our beautiful fractal backgrounds at abm-enterprises


Newsletter Signup
Name
Email
 

  C# - Validation - Validate email address
 


Save up to 75% on software

Drive Clone

the best name in hosting


public static bool isEmail(string inputEmail)
{
inputEmail = NulltoString(inputEmail);
string strRegex = @"^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}" +
@"\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\" + 
@".)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$";
Regex re = new Regex(strRegex);
if (re.IsMatch(inputEmail))
return (true);
else
return (false);
}
  What does it do?
   This short function will validate an email address using the built-in regex function.
 
  Features
  Added by Added Downloads Rating Popularity

  rpgivpgmr

10:00:35 PM Wednesday, September 27th 2006

106
 (1 vote)
 
 
  About the file
  Size Download Rate It  

  412 KB
  download this file
 
 
  Comments
no comments
 
  Add your comment
 Email  
 Subject  
 Comment  
 Verification code:

 
    All comments are screened by the admin prior to being posted
     
 
  Contacts
  Report Abuse