Set regEx = New RegExp ' 建立正則表達式。
regEx.Pattern = "^([a-zA-Z0-9]|[._])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+" ' 設置模式。
regEx.IgnoreCase = True ' 設置是否區分字符大小寫。
regEx.Global = True ' 設置全局可用性。
str="11122@163.com"
if regEx.test(str)=true then
Response.Write("合法")
else
Response.Write("不合法")
end if