I don't mess around with Regex too much but have been able to get this one online. /.+@.+/
. This will return true with both joe@joe
and joe@joe.com
. I want to make it so a user must supply a domain extension otherwise I want it to fail, I presume this is quite simple but I just can't figure it out. I've tried /.+@.+.\S/
but that didn't work. Any help would be great, thanks!
This will be used in both PHP and javascript. The current one works in both, the new will need to also.