SyntaxFix
Write A Post
Hire A Developer
Questions
Try
L.replaceAll("(\\t|\\r?\\n)+", " ");
Depending on the system a linefeed is either \r\n or just \n.
\r\n
\n