Question: Use regular expression to validate email address. This is what I have now, but I belive that this is the universal one. function emailValidation() {
Use regular expression to validate email address.
This is what I have now, but I belive that this is the "universal" one.
I need the one that is testing exactly what's listed below.
Your regular expression should test for exactly this:
- One or more word characters
- Exactly one at-sign
- One or more word characters
- Exactly one period
- Two or more characters that are a-z, A-Z, 0-9, period, or hyphen (One way to get "two or more" is to look for one such character and then look for one or more. Don't forget about character classes.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
