jai has asked for the wisdom of the Perl Monks concerning the following question:
hi,
can anyone give me the regex to match C-style functions.
given a C source file, the regex should match all the C functions and add a header b4 the function.
the functions may be of the form
the regex should match:int function(int a, char *b) { ... return 0; }
and print:int function(int a, char *b)
thanks -jai------------------------------------------------------ /* Function : function() Input: int a : char *b: Output: int : Author : Date : */ int function(int a, char *b) -----------------------------------------------------------
Back to
Seekers of Perl Wisdom