You can access capturing groups like this:
var myString = "something format_abc";
var myRegexp = /(?:^|s)format_(.*?)(?:s|$)/g;
var myRegexp = new RegExp("(?:^|s)format_(.*?)(?:s|$)", "g");
var match = myRegexp.exec(myString);
console.log(match[1]); // abc
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…