in reply to Removing javascript comments

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