I have a function call of the form:
myFunc(X,Y,Z=c("1","2","3")) {
.. code ..
}
I'm able to extract the outer arguments declaration as: X,Y,Z=c("1","2","3")
I'm trying to use regex to extract the variable names; however, a simple split on ',' doesn't work as the variable Z
has a default value associated with it. What's a regex I can use to get the three arguments (Z can have another regex to separate it from it's default value using the '=' character as a further step later).
Any ideas?