You can define the folloding regexp for a parameter, meaning string or integer or float or variable
string literal : "[^"]"
int : -?\d+
float : -?\d*\.\d+
variable / function name : [\w\d_]+
parameter : ("[^"]"|-?\d+|-?\d*\.\d+|[\w\d_]+)
Then your function is the same as a variable, followed by parenthesis a few parmeters, then closing parenthesis.
rough : function \( (|parameter(,parameter)*\)
adding potential spaces : function\s*\(\s*(|parameter\s$(,\s*parameter\s*)*\)
replacing blocks : [\w\d_]+\s*\(\s*(|("[^"]"|-?\d+|-?\d*\.\d+|[\w\d_]+)\s$(,\s*("[^"]"|-?\d+|-?\d*\.\d+|[\w\d_]+)\s*)*\)
Note that you will want to match multiline and case insensitive. I don't ensure it's error-proof, but at least you can follow the kind of thinking you have to deal with to fine tune it.
EDIT : I thought it was fairly complex (I probably issed some cases), but after your comment, if it's just to run eval, it's pointless...
note that my checks only assume that you use plain variables, no objects (otherwise, deal with the dot which can't be in first position)
eval('nameOfFuncThatDoesNotExist()');. Eval is a bad thing, even-more-so in not controlled environments where the input is not pre-sanitized..