G
Gamja
Hi all.
I need a source code stripper that removes some patterns from C or C++
files. A file contains the patterns should be loaded on runtime. I
want to remove all comments following "//" and my own decoration.
Please recommend a proper regular expression to match the these
patterns.
What I want to do is as following.
--BEFORE--
AAA
// debug begin
my_own_debug_function(blah, blah, blah);
....
// debug end
BBB
this_function_should_be_removed(a,
b,
c);
CCC
// debug begin
DDD
// debug end
EEE
--AFTER (line count of each line should be leaved as it is)--
AAA
BBB
CCC
EEE
---------
Thanks in advance.
Best regards,
Gamja
I need a source code stripper that removes some patterns from C or C++
files. A file contains the patterns should be loaded on runtime. I
want to remove all comments following "//" and my own decoration.
Please recommend a proper regular expression to match the these
patterns.
What I want to do is as following.
--BEFORE--
AAA
// debug begin
my_own_debug_function(blah, blah, blah);
....
// debug end
BBB
this_function_should_be_removed(a,
b,
c);
CCC
// debug begin
DDD
// debug end
EEE
--AFTER (line count of each line should be leaved as it is)--
AAA
BBB
CCC
EEE
---------
Thanks in advance.
Best regards,
Gamja