I am attempting to replace a white space in a string that occurs before a closing parentheses or after an opening parantheses.
For example the string "8 / ( 1 + 3 ) - 6 ^ 2"
Should be changed to: "8 / (1 + 3) - 6 ^ 2"
I am assuming this will use the replaceAll method but I'm unfamiliar with how to use this expression properly for my specific scenario.
Thanks a lot for your help.