Node.js examples for Regular expression:Email
Is String email via regex
/**//from www . ja v a 2s . c o m * Prototype */ String.prototype.isMail = function() { var reg = new RegExp('^[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*@[a-z0-9]+([_|\.|-]{1}[a-z0-9]+)*[\.]{1}[a-z]{2,6}$', 'i'); return reg.test(this.toString()); };