Monthly Archive: October 2017

How to replace backslashes in java 0

How to replace backslashes in java

The String#replaceAll() interprets the argument as a regular expression. The \ is an escape character in both String and regex. You need to double-escape it for regex: string.replaceAll(“\\\\”, “\\\\\\\\”); But you don’t necessarily need...