I want to find all occurrences of parent::, the called function and the parameter
For example:
parent::test( new ReflectionClass($this) );
But the following regular expression doesn't match the outer brackets - only the inner ones:
parent::(.*)\((.*)\);
Array /* output */
(
[0] => parent::test( new ReflectionClass($this) );
[1] => test( new ReflectionClass
[2] => $this)
)
How do I have to modify the pattern?
That is for a PHP script, so I can use some other string functions, too.