title: Why regExp test with flag 'g' return wrong value?
body: <p>The test function of the regular expression returns an invalid value when the 'g' flag is present.</p>
  
  <p>Example:</p>
  
  <pre><code>var regExpArh = /(\.rar|\.zip|\.7z)$/gi;
  var s = "55.7z";
  regExpArh.test(s); // return true
  regExpArh.test(s); // return false
  regExpArh.test(s); // return true
  regExpArh.test(s); // return false
  </code></pre>
  
  <p>Why?</p>