capn-regex by Elvin Yung Regex capture Nth group Quickstart var capn = require('capn-regex'); capn('{{x.x}}{{y}}{{}}', /\{{2}([^\}]*)\}{2}/g, 1); // ["x.x", "y", ""] Usage: capn(string, pattern, group);