打印本文 打印本文  关闭窗口 关闭窗口
用vbscript判断email地址的合法性
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005/9/10 14:19:48
这里是一断正则表达式的例子
<%
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
%>



打印本文 打印本文  关闭窗口 关闭窗口