http://www.perlmonks.org?node_id=996555


in reply to Regex to strip comments

That is a FAQ: How do I use a regular expression to strip C-style comments from a file?