My PHP script calls the Freebase API and outputs a string that can contain any number of open closed brackets. Each set of open closed brackets can also contain any number of open and then closed brackets. For instance:
$string = "random string blah (a) (b) blah blah (brackets (within) brackets) blah";
How can I use PHP and regex to control a string that results in output that does not contain the contents of any brackets or parentheses? For instance:
$string = "random string blah blah blah blah";
source share