asp 正则匹配邮箱

作者:夏雨芭蕉时间:2016-05-10 13:36:49 浏览量:

myString="abc@qq.com"

Set re = new RegExp '创建RegExp实例
re.Pattern = "\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}"  '后面的后缀似乎不起作用
re.IgnoreCase = false
re.Global =true
If re.Test(myString) Then 
     flag= ""
else

     flag="邮箱格式有误"

End if


Copyright © 2016 Allister All Rights Reserved