Original suggestion was: /^.+@.+\.\w+/
You do not want to use just \S because you do not want your pattern match to return true if you have a newline in the email address and fail if you have a space in the address. That is not a valid email address format. You want to stick with (.*). The "." matches any SINGLE character except a newline. You will also want to change your "*" to "+" because if you do not your pattern match will return true on an email such as "@.com" which is also not a valid email address format. The "*" tells your app to match on "none or more" of the previous characters. The "+" tells your app to match on "one or more" of the preceeding characters. This is what you want. You need at least 1 character on both sides of the "@" symbol for the address format to be correct.
In reply to Re: Yet Another Email Validation question
by Elijah
in thread Yet Another Email Validation question
by sweetblood
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |