public static void main(String[] args) {
String str = "啊\r\n啊";
str = str.replaceAll("(\r\n|\n)", "<br/>");
System.out.println(str);
}

 

亲测可用

相关文章:

  • 2022-12-23
  • 2021-10-23
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-12
  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案