What would be the syntax to replace all the content between a set of parentheses using PHP and preg_replace.
For example, I would like to remove “(unknowntext)” with the following piece of code:
$string = 'This text (wont) work';
preg_replace("(unknowntext)", "", $string);
Expected output: This text work
Of course, this won’t work for nested parenthesis, so don’t expect it to work in those cases.