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


in reply to Removing javascript comments

Maybe something in Regexp::Common, like Regexp::Common::comment could help? You can use ECMAScript comment parsing.