I'm trying to parse all of the text between one or more parentheses and return an array.
For example:
var string = "((CID:34746) OR (CID:8097)) ((CID:34277 OR CID:67300))";
var regex = /\(([^()]+)\)/g;
var results = string.match(regex);
// should result in ["CID:34746","CID:8097","CID:34277 OR CID:67300"]
// but instead is ["(CID:34746)", "(CID:8097)", "(CID:34277 OR CID:67300)"]
I've had 3 people on my team try to find a solution and nobody has. I've looked at all the ones I can find on SO and otherwise. (This one is where I posted the above regex from...)
The closest I've gotten is: /([^()]+)/g.