最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp 电子邮箱email验证实例程序
时间:2022-07-02 22:32:25 编辑:袖梨 来源:一聚教程网
function IsValidEmail(email)
dim names, name, i, c
'Check for valid syntax in an email address.
IsValidEmail = true
names = Split(email, "@")
if UBound(names) <> 1 then
IsValidEmail = false
exit function
end if
for each name in names
if Len(name) <= 0 then
IsValidEmail = false
exit function
end if
for i = 1 to Len(name)
c = Lcase(Mid(name, i, 1))
if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
IsValidEmail = false
exit function
end if
next
if Left(name, 1) = "." or Right(name, 1) = "." then
IsValidEmail = false
exit function
end if
next
if InStr(names(1), ".") <= 0 then
IsValidEmail = false
exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
IsValidEmail = false
exit function
end if
if InStr(email, "..") > 0 then
IsValidEmail = false
end if
end function
相关文章
- grep文本搜索与正则表达式完整代码示例实用指南 10-16
- AI漫剧伪装直男1‑24集无雾版夸克网盘资源免费分享 10-15
- AI漫剧玉僧入尘1-68集无雾无删版夸克网盘资源免费分享 10-15
- AI漫剧拿握疯太子32集正片+4分钟专属小剧场夸克网盘资源分享 10-15
- AI漫剧权臣是我心上人1-2季未删减版夸克网盘资源分享 10-15
- AI漫剧高三爱情故事1-45集无删无雾版夸克网盘资源分享 10-15