title: What is wrong with my date regex?
body: <pre><code>var dateRegex = /\/Date\((\d+)\)\//g;    // [0-9] instead of \d does not help.
  dateRegex.test("/Date(1286443710000)/"); // true
  dateRegex.test("/Date(1286445750000)/"); // false
  </code></pre>
  
  <p>Both Chrome and Firefox JavaScript consoles confirm. What the hell, guys?</p>
  
  <p>Edit: even simpler test case:</p>
  
  <pre><code>var dateRegex = /Date\(([0-9]+)\)/g;
  dateRegex.test("Date(1286445750000)"); // true
  dateRegex.test("Date(1286445750000)"); // false
  dateRegex.test("Date(1286445750000)"); // true
  dateRegex.test("Date(1286445750000)"); // false
  dateRegex.test("Date(1286445750000)"); // true
  </code></pre>
  
  <p>This shows that it alternates true/false every time...</p>