I'm trying to make a little program in Java, I need it to remove all the comments from a CSS file and put them in a jList and finally put the CSS file without comments in a jTextArea. It's kinda working, for example:
/* this is a comment */ and this is not
Works:
Another example:
/*
This is a comment
*/
this is not
That one works too:
But, the last one:
/*
w
w
*/
Won't work:
The part of putting the comment in the jList works fine but on the jTextArea is showing the complete file/source...
I don't know what to do, this is getting a little frustrating, I was hopping you guys could give me a hand!
If you don't know some of the words on the program, here's a short translation list:
- Archivo > File
- Abrir > Open
- Cerrar > Close
- Compilar > Compile
- Editor > Editor
- Lexico > Lexic
- Sintactico > Syntax
- Semantico > Semantic
- Comentarios > Comments
- Fuente sin comentarios > Source without comments
- Espacios en blanco > white spaces
This are the source files https://gist.github.com/3929988 (CompiladorGUI.java and regex.java).
I'd really appreciate any help! Thanks in advance.
PS: Sorry for my english. As you could see, spanish is my main language.