in reply to Many matches to an array

In addition to adding /g, you'll want to make your regex non-greedy, by changing (.+) to (.+?).