I'm having kind of a nightmare about this regEx I need to provide. The idea is basically to find all ',' characters between parenthesis within a certain string... but if inside that parenthesis there's another parenthesis that contain ',' then don't include this.
Sample:
(hello, something, hi, (another, one), last)
So the idea would be to detect and match 5 groups
1. (hello,
2. something,
3. hi,
4. (another, one),
5. last)
I've been struggling but I can't break it up like this, instead I get 6 groups
1. (hello,
2. something,
3. hi,
4. (another, <-- not ok
5. one), <-- not ok
6. last)
Have been trying with some regEx but I can't detect the double ( ) pattern, the best I could achieved so far was
(?!\(.*)[,](?=.*\))
Thanks for the time and help