Solved
Need a Urgent Help, removing the first comment in all supplied files in java
Posted on 2008-10-01
I have to create a java class which accepts two java.io.File object in
constructor as input and output and a method which performs replacement.
- the replacement must take into account the file ending of the input file:
+ for .java, .cpp, .c and .css remove the FIRST occurrence of "/* ... */"
+ for .xml, .xhtml, .html and .xsl remove the FIRST occurrence of "<!-- ...
-->"
+ all other files should be untouched
- note that the comment strings could be anywhere in a line, in sinlge or
multiple lines