Perl script to remove comments from C Program using regular expressions
This script will remove both C style comments /**/ and C++ comments //. Another advantage of this script is that, it will not remove /* ... */ which comes inside the double quotes like "This is /* a */string". This is acheived with the help of conditional operations in perl regular expressions(regexp). Here regular expression is used with "e" extented switch, inorder to put comments and spaces in between the regular expression. This makes it readable.
Thanks to Lorin.