I have written a code to validate a string.but i am getting an error in the 3rd sentence as "the name "NullToString"does not exist in the current context"...can anyone help me out...
validate a email
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);
}
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster
nick.crane 342 Veteran Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.