According to your function .@ is a valid email address. The least you could have done was to check that @ and . were in the correct order with at least 1 character between, before and after them.
There's a PHP snippet up that verifies the existence of an MX record pointing to the domain of an email address . . . that's much more likely to help you. (Especially since email-address regexes can get untenably long for my tastes!)
I've got good news, and I've got bad news: The universe is merely a figment of my imagination. Now are you ready for the bad news?
This would validate the fact that there is an at sign and a period with arbitrary characters around them. It doesn't check for invalid characters and such.
I've got good news, and I've got bad news:
The universe is merely a figment of my imagination.
Now are you ready for the bad news?
This doesn't verify an e-mail address at all.
Bobby R Ward
---------------------
bobbyrward@gmail.com
Yea, boost::regex is the way to go.
- Billism