Here's some code I whipped up:
Check it out: here
Also here is an example of my code you can test RIGHT NOW in a webpage
Here's one I didn't write that could be handy, though his code will fail on certain regex literals: http://james.padolsey.com/javascript/removing-comments-in-javascript/
EDIT:
The code I wrote is as is. I am not updating it as it is something I wrote when I was a teenager and rather new to programming. If there is a bug, you can fix it.