Java将\n替换成<br>

String str = "1)我是音神。\n2)我是音神。";
str = str.replaceAll("\\n","
"
);

你可能感兴趣的:(Java,java)