下面,小编带您去了解一下正则表达式简单的检查输入email是否合法程序,生活就是不断的发现新事物,get新技能~
function chkEmail(email)
on error resume next
dim i,l,pos1,pos2
chkEmail=true
if isnull(email) then chkEmail= function
pos1= instr(email,"@")
pos2=instrRev(email,".")
if not(pos10) or not (pos20) or pos1pos2 then
chkEmail=false
end if
if then
end function