jabascript extract a domain from given mail id code example
Example: retrieve domain from email address node js
var email = "[email protected]";
var name = email.substring(0, email.lastIndexOf("@"));
var domain = email.substring(email.lastIndexOf("@") +1);
console.log( name ); // john.doe
console.log( domain ); // email.com