Code:
public Boolean EmailAddressCheck(string emailAddress)
{
bool functionReturnValue = false;
string pattern = "^[a-zA-Z][\\w\\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\\w\\.-]*[a-zA-Z0-9]\\.[a-zA-Z][a-zA-Z\\.]*[a-zA-Z]$";
Match emailAddressMatch = Regex.Match(emailAddress, pattern);
if (emailAddressMatch.Success)
{
functionReturnValue = true;
}
else
{
functionReturnValue = false;
}
return functionReturnValue;
}