regex - Perl one liner to remove comments, removes lines which are not comments also -
i using perl 1 liner remove comments from c file, removes lines have asterik(*) in between words, eg
static void * here in 1 liner using:
'perl -0777 -pe ''s{/\*.*?\*/}{}gs'' ' sourcefile ' > ' destfile could please suggest?
thanks
this question answered in perlfaq.
"how use regular expression strip c style comments file?"
Comments
Post a Comment