Q:

Why is this regex matching also words within a non-capturing group? 

I have this string (notice the multi-line syntax):
var str = `   Number One: Get this
    Number Two: And this`;

And I want a regex that returns (with match):
[str, 'Get this', 'And this']

So I tried str.match(/Number (?: One|Two): (.*)/g);, but that's returning:
["Number One: Get this", "Number Two: And this"]

There can be any whitespace/line-breaks before any "Number" word. 
Why doesn't it return only what is inside of the capturing group?  Am I misundersating something?  And how can I achieve the desired result? 

A:

Per the MDN documentation for String.match:

If the regular expression includes the g flag, the method returns an Array containing all matched substrings rather than match objects.  Captured groups are not returned.  If there were no matches, the method returns null. 

(emphasis mine). 
So, what you want is not possible. 
The same page adds:

if you want to obtain capture groups and the global flag is set, you need to use RegExp.exec() instead. 

so if you're willing to give on using match, you can write your own function that repeatedly applies the regex, gets the captured substrings, and builds an array. 

Or, for your specific case, you could write something like this:
var these = str.split(/(?:^|\n)\s*Number (?: One|Two): /);
these[0] = str;

