打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
电子邮件email验证代码-asp
function IsValidEmail(email)

  dim names, name, i, c

  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

  


本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
VBA实用小程序14:处理文件名的自定义函数
Excel 人民币大写文字转换为小写金额
查找替换所选字符
VBA如何查找字符字符串中某个字符的位置instr()函数
获取打开的记事本中的内容
从字符串中分离文件路径,文件名及其扩展名
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服