var emailReg = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/ mean code example
Example: /^([w-.]+@([w-]+.)+[w-]{2,4})?$/ in php
function isEmail(email) {
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
return regex.test(email);
}