title: Removing an invalid escape sequence from a Java String
body: <p>I have an invalid escape sequence inside a json string.  The sequence is:</p>
  
  <blockquote>
    <p>'ngram': "'s\xa0cancer prevention"</p>
  </blockquote>
  
  <p>I have been trying to remove this sequence completely by replacing it with a blank string, however each attempt fails.  I have tried the following ways:</p>
  
  <pre><code>qumlsOutputAsJson = qumlsOutputAsJson.replaceAll("[^\\x20-\\x7E]", "");
  </code></pre>
  
  <p>and</p>
  
  <pre><code>qumlsOutputAsJson = qumlsOutputAsJson.replaceAll("\\.", "");
  </code></pre>
  
  <p>and even a routine:</p>
  
  <pre><code>    private String removeNonAscii(String text){
      String asciiText = "";
      for (char aChar: text.toCharArray()){
          if((int)aChar&lt;=0x7F)
              asciiText = asciiText + Character.toString(aChar);
      }
      return asciiText;
  }
  </code></pre>
  
  <p>All have failed.</p>
  
  <p>I'm sure there is an obvious way, but any direction much appreciated.</p>