title: RegExp: Not every group is captured but every matched.. (debuggex.com example)
body: <p>Test case:</p>
  
  <pre><code>/((adam)|(eva))+/gi.exec("adameva");
  
  Array[4]
      0: "adameva"
      1: "eva"
      2: undefined  //(should contains captured "adam" word)
      3: "eva"
      index: 0
      input: "adameva"
      length: 4
  </code></pre>
  
  <p>As you can see there are 3 groups that can be captured</p>
  
  <pre><code>(...)+   - first
  (adam)   - second
  (eva)    - third
  </code></pre>
  
  <p>and input to test against this regex is:</p>
  
  <pre><code>adameva
  </code></pre>
  
  <p>as you can see in debbugex live example or above, text is matched, but..</p>
  
  <p>only 1 and 3 group is captured. Why not 2? It's matched as well..</p>
  
  <p><a href="https://www.debuggex.com/r/oXTo6r05GKJr1APX" rel="nofollow noreferrer">Debuggex Demo</a></p>
  
  <p>(when you use RE2 regular expresion engine, bug doesn't appear, if someone is intrested: <a href="https://github.com/uhop/node-re2" rel="nofollow noreferrer">https://github.com/uhop/node-re2</a>)</p>