title: Why `pattern.test(name)` opposite results on consecutive calls
body: <p>Why is this code returning first true, then false</p>
  
  <pre><code>var pattern = new RegExp("mstea", 'gi'), name = "Amanda Olmstead";
  
  console.log('1', pattern.test(name));
  console.log('1', pattern.test(name));
  </code></pre>
  
  <p>Demo: <a href="http://jsfiddle.net/arunpjohny/zNkFv/">Fiddle</a></p>