当前位置:主页 > 查看内容

正则表达式简单的检查输入email是否合法程序

发布时间:2021-07-22 00:00| 位朋友查看

简介:functionchkEmail(email) onerrorresumenext dimi,l,pos1,pos2 chkEmail=true ifisnull(email)thenchkEmail=false:exitfunction pos1=instr(email,"@") pos2=instrRev(email,".") ifnot(pos10)ornot(pos20)orpos1pos2then chkEmail=false endif iferr.number……
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

原文链接:https://m.jb51.net/article/9234.htm
本站部分内容转载于网络,版权归原作者所有,转载之目的在于传播更多优秀技术内容,如有侵权请联系QQ/微信:153890879删除,谢谢!

推荐图文


随机推荐