判断邮箱

 

1 export function testEmail(email) {
2     var reg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$");
3     return reg.test(email);
4 }

 

posted @ 2020-10-10 09:49  思猿客  阅读(102)  评论(0编辑  收藏  举报