var rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;
var str = ' <div id=top></div>';
var match = rquickExpr.exec(str);
console.log(match);
then i get
[" <div id=top></div>", "<div id=top></div>", undefined, index: 0, input: " <div id=top></div>"]
why there is undefined?