Trying to create a regex that match any character inside a parentheis.
My regex pattern is this
preg_match('/\((.*?)\)/', $listanswer, $answer);
All string inside the parenthesis is the matching pattern. But the problem is, when I try to match eg,. (this word), (sample data)
it only returns null. When if no space added, it is matched. Any idea on this?
Already tested it here. http://regex101.com
It worked just fine. Did i miss something>?