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(vemail) ' Execute search.
if match.count then
response.Write Infobox("用户注册出错,下面是产生错误的可能原因:请输入正确的联系邮箱!","back","")
response.end
end if作者: 天泪离星 时间: 2010-1-8 04:05
总是不能正确检测错误,
总是报告出错。作者: ‖蠻忝謃☆ 时间: 2010-1-8 04:05
有啥问题?作者: Nick 时间: 2010-1-8 04:05
正确的格式也报错,这部分是我在网上下的
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(vemail) ' Execute search.
if match.count then