When I run
var episode_pattern = /(?:EPISODE\:\s*\#)([0-9]*)/g;
console.log(episode_pattern.exec("EPISODE: #3"));
I get back both the "EPISODE: #3" and the "3" in the matches.
However using the (?: I expected to only get "3" in the matches array.