Replacing '\' character in a Java String
<p>I have a java string with <code>"\\"</code> character (extra <code>'\'</code> for escaping). I want to replace all the occurence of <code>"\\"</code> to <code>"&amp;#x5c;"</code>. Any idea how it can be done? <code>str.replaceAll("\\", "&amp;#x5c;")</code> does not work. The problem is in replacing the <code>\</code> character.</p>
