RE: Need to extract only the function name no brackets reqd.





It is returning just 1.I think the result of the expression.

Hello,

Have you tested it?why that regex just return 1?

See:

$ perl -e '$_="sub myfunc_123(\$,\$){";my ($func_name) = /sub\s+(\w+)/;print $func_name'
myfunc_123
.