Hi,
I'm trying to do some server-side validation. To validate an e-mail address I'm using the following regular expressions.
re.Pattern = "^\w+\.\w+@\w+\.\w+"
results = re.Test(email)
If results Then
' Nothing
Else
strError = strError & "* Please enter a correct e-mail address.<br>"
End If
There's a problem with e-mailadresses like jvdh@hotmail.com. When I fill that in, I get an error message to enter a correct e-mail address. This is because there's no dot in the first part. An e-mail address like joris.vanderhoeven@kaneka.be is correct.
What changes do I need to do to the pattern to make sure that both jvdh@hotmail.com and joris.vanderhoev... will be accepted ?
Thanx!
I'm trying to do some server-side validation. To validate an e-mail address I'm using the following regular expressions.
re.Pattern = "^\w+\.\w+@\w+\.\w+"
results = re.Test(email)
If results Then
' Nothing
Else
strError = strError & "* Please enter a correct e-mail address.<br>"
End If
There's a problem with e-mailadresses like jvdh@hotmail.com. When I fill that in, I get an error message to enter a correct e-mail address. This is because there's no dot in the first part. An e-mail address like joris.vanderhoeven@kaneka.be is correct.
What changes do I need to do to the pattern to make sure that both jvdh@hotmail.com and joris.vanderhoev... will be accepted ?
Thanx!