列表

详情


FED29. 邮箱字符串判断

描述

判断输入是否是正确的邮箱格式

输入描述

邮箱字符串

输出描述

true表示格式正确

原站题解

HTML/CSS/JavaScript 解法, 执行用时: 870ms, 内存消耗: 77900KB, 提交时间: 2021-02-22

{"css":"","js":"function isAvailableEmail(sEmail) {\n    var reg=/^([\\w+\\.])+@\\w+([.]\\w+)+$/;\n\n    return reg.test(sEmail);\n}","html":"","libs":[]}

HTML/CSS/JavaScript 解法, 执行用时: 873ms, 内存消耗: 77948KB, 提交时间: 2021-02-22

{"css":"","js":"function isAvailableEmail(sEmail) {\n    var reg = /^[\\w\\._-]+@[\\w]+[\\.\\w]+$/\n    return reg.test(sEmail)\n}","html":"","libs":[]}

HTML/CSS/JavaScript 解法, 执行用时: 874ms, 内存消耗: 77900KB, 提交时间: 2020-11-23

{"css":"","js":"function isAvailableEmail(sEmail) {\n    var reg = /^([\\w+\\.])+@(\\w+)([.]\\w+)+$/\n    return reg.test(sEmail)\n}","html":"","libs":[]}

HTML/CSS/JavaScript 解法, 执行用时: 876ms, 内存消耗: 77796KB, 提交时间: 2020-11-18

{"css":"","js":"function isAvailableEmail(sEmail) {\n    return /^([\\w+\\.])+@(\\w+)([.]\\w+)+$/.test(sEmail)\n}","html":"","libs":[]}

HTML/CSS/JavaScript 解法, 执行用时: 876ms, 内存消耗: 77960KB, 提交时间: 2020-12-26

{"css":"","js":"function isAvailableEmail(sEmail) {\n    let reg=/^([\\w+\\.])+@(\\w+)([.]\\w+)+$/\n    return reg.test(sEmail);\n}","html":"","libs":[]}

上一题