Say I want to search for any expression that is being sent to a particular function, and remove the function allowing the expression to stand on its own. That would require matching on the function name and removing it and its brackets. Of course the problem is that the brackets are wrapped around an expression that must stay where it is. Is there anyway to do this with a regexp?
$result1 = function($expression);
$result2 = function($another);
$result1 = $expression;
$result2 = $another;
Is there anyway to get that closing bracket? Is there a way of saving the portion that you want to keep somehow so that you can put it in the replace portion of the regexp?
Thanks for any help.