RSS
热门关键字:  性福人生  生化危机  虚拟人生  o ice  秘密潜入1

用vbscript判断email地址的合法性

来源: 作者:无忧d下载站采集 时间:2008-04-05 Tag: 点击:
 这里是一断正则表达式的例子
  <%
  Function isemail(strng)
  isemail = false
  Dim regEx, Match ' Create variables.
  Set regEx = New RegExp ' Create a regular expression object (stupid, huh?)
  regEx.Pattern = "^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$" ' Sets pattern.
  regEx.IgnoreCase = True ' Set case insensitivity.
  Set Match = regEx.Execute(strng) ' Execute search.
  if match.count then isemail= true
  End Function

最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册