- 1
- 2
- 3
- 4
contents = contents.replaceAll("\\<(\\w+)\\>", "<CT_$1>\n");
contents = contents.replaceAll("\\<(\\w+)(\\s\\w+)=\\"(\\w+)\\"\\>", "<CT_$1$2=\"$3\">\n");
contents = contents.replaceAll("\\<(\\w+)(\\s\\w+)=\\'(\\w+)\\'\\>", "<CT_$1$2='$3'>\n");
contents = contents.replaceAll("\\</(\\w+)\\>", "\n</CT_$1>\n");