I am looking for a proper and robust way to find and replace all newline or breakline chars from a String independent of any OS platfo
newline
breakline
String
If you want literal \n then following should work:
\n
String repl = str.replaceAll("(\\r|\\n|\\r\\n)+", "\\\\n")