一个验证EMAIL是否合法的函数(VBScript)
<% function isemail(str) if isnull(str) then exit function end if dim regstr,regex set regex=New RegExp regex.pattern="/w+([-+.]/w+)*@/w+([-.]/w+)*/./w+([-.]/w+)*" isemail=regex.test(str) set regex=nothing end function if not isemail("xfclub@163.com") then response.write "不正确的Email" else response.write "正确的Email" end if %> |