The Situation
I have a string that I want to match the same capture group multiple times. I need to be able to get at both matches.
Example Code
var curly = new RegExp("{([a-z0-9]+)}", "gi");
var stringTest = "This is a {test} of my {pattern}";
var matched = curly.exec(stringTest);
console.log(matched);
The Problem
Right now, it only shows the first match, not the second.
JSFiddle Link