I have the following string: x = '(example)' and I want to remove both parentheses, in one command, using stringr.
I tried str_remove(x, '\(|\)'), but this removed only one parenthese (the first one). Any idea why this did not work and how it can work?
There are several posts on similar issues, but no one helped: https://stringr.tidyverse.org/articles/regular-expressions.html or remove parenthesis from string or stringr: Removing Parentheses and Brackets from string
Thanks