题解 | #获取字符串的长度#
邮箱字符串判断
http://www.nowcoder.com/practice/c72b2b5472704d4a98597cb74b0257a7
function isAvailableEmail(sEmail) {
let reg = /^([\w.-]+)@([\w-])+(.[\w-]+)+$/
return reg.test(sEmail)
}
M@N
M由[a-zA-Z0-9_.-]组成
N由.*.**组成,故而是 [\w-]+(.[\w-]+)+