题解 | #邮箱字符串判断#
邮箱字符串判断
https://www.nowcoder.com/practice/c72b2b5472704d4a98597cb74b0257a7
function isAvailableEmail(sEmail) { var regexp = /^([a-zA-Z0-9_\.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; return regexp.test(sEmail); }
邮箱字符串判断
https://www.nowcoder.com/practice/c72b2b5472704d4a98597cb74b0257a7
function isAvailableEmail(sEmail) { var regexp = /^([a-zA-Z0-9_\.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; return regexp.test(sEmail); }
相关推荐