var r = RegExp("a?");
var s = "aaa";
if(s.match(r)){document.write("YES");}
上面的正则是匹配成功的,可是按照我所想的它应该只能是一个a或者没有才能成功,
为什么3个a也能成功