Code:
String text = "/** */test/** */test";
System.out.println(text.replaceAll("/\\*\\*.*\\*/"));
while((line = br.readLine()) != null){
js_text.append(line.trim().replaceAll("//.*", "")); //gets the file text(removed comments //)
}
int start=0,end=0 ;
while((start = js_text.indexOf("/*")) != -1){
end = js_text.indexOf("*/");
if(end != -1){
js_text.replace(start, end+2, "");
}
}
Comment