電子郵箱email驗證實例程序
function IsValidEmail(email)
dim names
IsValidEmail = true
names = Split(email
if UBound(names) <>
IsValidEmail = false
exit function
end if
for each name in names
if Len(name) <=
IsValidEmail = false
exit function
end if
for i =
c = Lcase(Mid(name
if InStr("abcdefghijklmnopqrstuvwxyz_
IsValidEmail = false
exit function
end if
next
if Left(name
IsValidEmail = false
exit function
end if
next
if InStr(names(
IsValidEmail = false
exit function
end if
i = Len(names(
if i <>
IsValidEmail = false
exit function
end if
if InStr(email
IsValidEmail = false
end if
end function
From:http://tw.wingwit.com/Article/program/net/201311/14046.html