I have this REGEX:
([A-Za-z]+[\w_]*)\s*\(([[A-Za-z]+[\w_]*\s,?]*)
This REGEX is supposed to find strings like this:
foo(param1,param2,param3......)
Where the first group is the name (it must start with a letter), after that comes the second group which I am not sure about. The problem is that I do not know how many parameters I will receive. The second part is suppose to find a concatenation of zero or more parameters, all in the same format [A-Za-z]+[\w_]
. I tried adding a []
around it and a *
at the end. How will I be able to match and extract all the parameters into a array list? Is it even a correct REGEX syntax?