title: '\' Getting Stripped Automatically In StringObject.ReplaceAll method in Java
body: <p>I am using Jre 1.6.
  I am executing the following lines of code:</p>
  
  <p>String unicodeValue = "\u001B"; text = text.replaceAll("" + character, unicodeValue);</p>
  
  <p>Here, text is a string object containing an invalid XML character of Unicode value '\u001B'.
  So, I am converting the invalid XML character to its Unicode value to write in the XML.</p>
  
  <p>But on doing text.replaceAll, the '\' is getting stripped and the character is replaced by 'u001B'.</p>
  
  <p>Can anyone please suggest a way to retain the '\' after replacing the character with its unicode value ?</p>