title: How to return only captured groups in a JavaScript RegEx with multiple matches
body: <p>Simplified example:</p>
  
  <p><code>/not(?:this|that)(.*?)end/ig.exec('notthis123end notthat45end')</code></p>
  
  <p>returns</p>
  
  <p><code>["notthis123end", "123"]</code></p>
  
  <p>I'm shooting for</p>
  
  <p><code>["123", "45"]</code></p>
  
  <p>All I've figured out is putting the RE in a <code>RegExp</code> object and running a while loop around the <code>exec</code>, which seems kinda silly, or using <code>match</code>, but getting back the entire match, not just the captured part.</p>