正则表达式简单的检查输入email是否合法程序
时间:2021-11-23 11:45:43|栏目:|点击: 次
function chkEmail(email)
on error resume next
dim i,l,pos1,pos2
chkEmail=true
if isnull(email) then chkEmail=false:exit function
pos1= instr(email,"@")
pos2=instrRev(email,".")
if not(pos1>0) or not (pos2>0) or pos1>pos2 then
chkEmail=false
end if
if err.number<>0 then err.clear
end function
on error resume next
dim i,l,pos1,pos2
chkEmail=true
if isnull(email) then chkEmail=false:exit function
pos1= instr(email,"@")
pos2=instrRev(email,".")
if not(pos1>0) or not (pos2>0) or pos1>pos2 then
chkEmail=false
end if
if err.number<>0 then err.clear
end function
上一篇:CentOS 6.5 制作可以ssh登录的Docker镜像
栏 目:
下一篇:docker 容器上编译 go 程序提示找不到文件问题
本文地址:http://www.codeinn.net/misctech/184556.html






