I want to get the contents of parenthesis within a string in PHP by regular expression. I tried this regex
preg_match_all('/\((.*)?\)/', $string, $match);
But this get the content between the first ( and last ). How can I get the content of every ( )separately to make the array of match?
You need to change the
.*with[^\)]*