I need to extract the arguments from a function Say, Function_1(arg1,agr2,....argn).
Is it possible to strip the arguments alone with out brackets.
I tried using \([\w,]*\)
expression
I need to extract the arguments from a function Say, Function_1(arg1,agr2,....argn).
Is it possible to strip the arguments alone with out brackets.
I tried using \([\w,]*\)
expression
If you want to "catch" the matches you need to put braces around them:
\(([\w,]*)\)
This way you will find everything arg1,arg2
in $1
.
use this Regular Expression (?<=[\w]*\()[\w,]*(?=\))
to solve the purpose