var email = "[email protected]";
if(/^[\w.]+@\w+(\.\w+){1,2}$/.test(email))
   alert('ok');