当前位置: 移动技术网 > IT编程>开发语言>正则 > 正则表达式简单的检查输入email是否合法程序

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

2017年12月12日  | 移动技术网IT编程  | 我要评论
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

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网