日期:2014-05-16 浏览次数:20417 次
var array=["111111","112233","abcabc","1,2.3(a","csdn135","csdn_#@","csdn_1"];
var pattern=/^(?!\d+$)(?![a-z]+$)(?![!@#$%^&*()_+]+$)(?![\da-z!@#$%^&*()_+]*?([\da-z!@#$%^&*()_+])[\da-z!@#$%^&*()_+]*?\1)[\da-z!@#$%^&*()_+]+$/i;
for(var i in array)
alert(array[i]+":"+pattern.test(array[i]));