2014年6月29日 星期日

[Perl] Remove all comments in c

Command


perl -i -wpe 'BEGIN{undef $/} s/\/\/[^\n\r]*(\n\r)?//g; s!/\*.*?\*/!!sg;' <file-name>    

Reference


0 意見:

張貼留言