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