For example suppose I have the following string
“we went to the (big) zoo”
I would like to match and replace the text between the parentheses and also catch one of the extra white spaces to end up with
“we went to the zoo”
What is the syntax to do this? I can’t seem to quite get it right
You need to a global search of
\s*\([^)]\)\s*replacing each occurrence with a single space. Exactly how you would code this depends on what language you are using.In Perl it would look like
OUTPUT