Javascript regular expression: \0


<input type="button" value="Match" onclick="javascript:demo('abc \u0000');return false;" />
&nbsp;&nbsp;&nbsp;
<input type="button" value="No Match" onclick="javascript:demo('abc');return false;" />

<script type="text/javascript" language="JavaScript">
//<![CDATA[
   function demo(text) {
      var re = /\0/;
      if (text.match(re)) {
         alert("match");
      } else {
         alert("no match");
      }
   }
//]]>
</script>