title: How to remove backslash from String in Java?
body: <p>I have a string value that includes backslash character (<code>\</code>). My goal is to replace it with the character(<code>_</code>).</p>
  
  <p>I did the following as per solution provided in this question <a href="https://stackoverflow.com/questions/2242417/how-to-remove-the-backslash-in-string-using-regex-in-java">How to remove the backslash in string using regex in Java?
  </a></p>
  
  <p><code>String x = "2\5\2017";
   x = x.replaceAll("\\\\", "_");</code></p>
  
  <p>but I am always getting (<code>27</code>) as a value of <code>x</code>. Note: there is unknown character between 2 and 7. In the console, I can see it as a small square.</p>