当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
js查找字符串中出现了三次的字符
C language code specification
几款笔记软件的优缺点
Set与Map
【正河源刀具相关】
New features of ES6
百度地图3D旋转和倾斜角度的调整
自用学习笔记-连接式与非连接式访问数据库
若依如何input改成文本
JS中 t, _ => 的解析
五个路由守卫的使用
C# Task.Delay和Thread.Sleep的区别
freeCodeCamp----budget & category 练习
锚点定位——如何设置锚点居页面顶部距离,锚点定位并距离顶部一定偏移
C# 监听WMI事件
Devexpress Gridview 添加全选列
Node数据流
oninput 一个函数达到控制多个oninput的效果(将本输入框的内容作为参数)【很实用,很实用】
Overview of node file system and buffer
1-3 NodeJS的安装之清单配置与跑项目环境









