下面这款正则表达式可以验证多个邮箱地址
^([a-za-z0-9_-])+@([a-za-z0-9_-])+((.[a-za-z0-9_-]{1,4}){1,4})$ 关键是(.[a-za-z0-9_-]{1,4})
看一款asp教程邮箱验证实例
<%
function isemail(strng)
isemail = false
dim regex, match
set regex = new regexp
regex.pattern = "^w+((-w+)|(.w+))*@[a-za-z0-9]+((.|-)[a-za-z0-9]+)*.[a-za-z0-9]+$"
regex.ignorecase = true
set match = regex.execute(strng)
if match.count then isemail= true
end function
%>
时间: 2024-09-20 17:45:59