Removing backslash and newline character (occurring together) in Java
===

I have stream of data coming from different feeds which I need to clean up.

Data is in specific format and if some sentence spans through multiple lines it is separated using "\"(backslash), which I want to remove. \ is also present in other part of text for escaping quotes etc and I don't want to remove these backslashes. So eventually I want to remove "\\\n".

I have tried following regex for removing \ and \n but it didn't work :


<code> singleLine.replaceAll("(\\\\\\\\n|\\\\\\\\r)", ""); </code>

I am not sure what regex would work in this case.

