[Perl] Remove all comments in c Posted by Computer Newbie on 晚上11:42 in C, Perl / No comments Command perl -i -wpe 'BEGIN{undef $/} s/\/\/[^\n\r]*(\n\r)?//g; s!/\*.*?\*/!!sg;' <file-name> Reference How can I delete all /* */ comments from a C source file? ↩ Remove comments from C/C++ code ↩ Share This: Facebook Twitter Google+ Stumble Digg 以電子郵件傳送這篇文章BlogThis!分享至 X分享至 Facebook
0 意見:
張貼留言