SoFunction
Updated on 2025-03-03

Regular expressions simply check whether the input email is legal.

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 <>0 then 
end function