I need a regex that replaces all brackets with a single bracket, but not if an apostrophe is leading the bracket
Examples
a) ))) --> expected )
b) )))))) --> expected )
c) '))) --> expected ))
Would anybody please help?
I tried replaceAll("[^']\\)\\)+", ")");
but unfortunately this is not working.