/** * @returns {boolean} true: email; false: not email */ this.isEmail = function(str){ console.log("isEmail in"); var re = /^([a-za-z0-9]+[_|-|.]?)*[a-za-z0-9]+@([a-za-z0-9]+[_|-|.]?)*[a-za-z0-9]+.[a-za-z]{2,3}$/; return re.test(str); };
转载于:https://www.cnblogs.com/wintersweetwang/p/4228517.html
相关资源:数据结构—成绩单生成器