Reputation: 119
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
Upvotes: 1
Views: 2316
Reputation: 6241
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
.
Upvotes: 2
Reputation: 812
use this Regular Expression (?<=[\w]*\()[\w,]*(?=\))
to solve the purpose
Upvotes: 1