Different form of Email Validation Posted: 26 Jun 2003
Why wouldn't you just use RegExp? This would have saved you a massive amount of time. You could have done something like the following
Function validateEmail(email) { Dim regEx, regVal Set regEx = New RegExp regEx.Pattern = "/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/" regVal = regEx.Test(email) If RegVal Then 'It is an email address Else 'It is not an email address End If End Function