<script>
var value = "teset";
var s = new RegExp(value
$("
if (s
{ }
else {
//失敗
}
});
</script>
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20106.html