8到18位数字、字母、特殊字符中的两种及以上组合,不包含/\'"这4种特殊字符
var str = "hAAAhg66ggfg";
var t = /^[0-9A-Za-z@!#$%^(){}\.\[\]*+\-]{8,18}$/.test(str);
var n = /[@!#$%^(){}\.\[\]*+\-]/.test(str) ? 1 : 0;
n += /[A-Za-z]/.test(str) ? 1 : 0;
n += /[0-9]/.test(str) ? 1 : 0;
if (t && n>=2) {
alert("通过");
} else {
alert("不通过");
}