Node.js examples for String:String Value
Check if a string is a valid email address
//check the email function checkEmail(str) { var pattern = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/; if (pattern.test(str)) { return true; } else {//from ww w . jav a2 s. c o m return false; } }