I am using the pattern:
on the below text to match only single terms inside a pair of () and capture it in group 1 unless a superscript number exist on the outside of the closing ) or I have multiple ()s next to each other (ex. (s)(2x)).
Everything seems to work the way I want except two items:
The terms that are numbers only (4.4, 12 & -33) match but nothing exists in group 1-3 and group 4 & 5 don't match.
The last expression (s)(2x) matches both terms inside the ()s and I don't want it to match if I have multiple ()s next to each other.
What am I missing? Is there a way to make this less complicated?