当前位置:网站首页>Mailbox string judgment
Mailbox string judgment
2022-04-23 06:50:00 【KK should continue to work hard】
Mailbox string judgment
subject :
Determine whether the input is the correct email format , Output true The format of the expression is correct
answer :
function isAvailableEmail(sEmail) {
//([\w+\.])+ Represents multiple letters 、 Underline 、 Numbers 、 spot
var reg = /^([\w+\.])+@\w+([.]\w+)+$/;
// perhaps
// /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
return reg.test(sEmail);
}
Knowledge point : Regular expressions 、test()
版权声明
本文为[KK should continue to work hard]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230551364031.html
边栏推荐
猜你喜欢
随机推荐
常用sql语句收藏
查漏补缺(二)
oninput 一个函数达到控制多个oninput的效果(将本输入框的内容作为参数)【很实用,很实用】
查漏补缺(四)
Node data flow
五个路由守卫的使用
.Net Core 下使用 Quartz —— 【5】作业和触发器之触发器的通用属性和优先级
el-table添加序号
查漏补缺(三)
1-5 NodeJS CommonJs规范
NodeJS 模块之间的使用
.NET类型转移
freeCodeCamp----shape_calculator练习
uniapp 自定义搜索框适配小程序对齐胶囊
JS的解析与执行过程
C language code specification
小米摄像头异常解决
Parse PSD files and map them into components
Arm common assembly instructions
如何使用input表单向服务发送(占用较小)图片文件(body传输)?涉及到FileReader内置对象