I'm trying to write some code that will take a commented java file, remove all the comments and leave the code intact. I managed a method to remove // line comments without much bother, but /* ---*/ multiline comments aren't so simple.
I thought it would be fairly simple when I started, but have now created some bizarre recursive methods (and headaches!) without coming up with a solid solution.
Does anyone know of any simple way to do this, is there a something in the java librarys that would do it?
(My text editor doesn't seem to have much of a problem with it.)
Any thoughts??