public static void main(String[] args) {
String content = "total 12345\n" +
"drwxr-xr-x. 6 root root 55 Oct 26 11:08 \u001B[0m\u001B[01;34mTest\u001B[0m\n" +
"-rw-r--r--. 1 root root 79779840 Oct 26 13:43 \u001B[01;31mtest.tar\u001B[0m\n" +
"drwxr-xr-x. 2 root root 46 Oct 26 11:06 \u001B[01;34mxxl\u001B[0m\n";
System.out.println("----------------------------------------------------------------------------------");
System.out.println(content);
System.out.println("----------------------------------------------------------------------------------");
System.out.println(content.replaceAll("\\e\\[[\\d;]*[^\\d;]", ""));
System.out.println("----------------------------------------------------------------------------------");
}
public static final String REPLACE_REGEX_COLOR = "\\e\\[[\\d;]*[^\\d;]";