html5中文学习网

您的位置: 首页 > 网络编程 > 正则表达式 » 正文

正则表达式简单的检查输入email是否合法程序_正则表达式_脚本之家

[ ] 已经帮助:人解决问题
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
(责任编辑:)
推荐书籍
推荐资讯
关于HTML5先行者 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 人才招聘 - 帮助