You need to create a set of escaped (with
) parentheses (that match the parentheses) and a group of regular parentheses that create your capturing group:
var regExp = /(([^)]+))/;
var matches = regExp.exec("I expect five hundred dollars ($500).");
//matches[1] contains the value between the parentheses
console.log(matches[1]);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…