title: Convert from Unicode Characters to blank in XML File
body: <p>How can i converts specific Unicode Characters From Xml file which is not valid in XML file at the time Desensitization. I just tried to use below Regex Function but not getting Success.</p>
  
  <pre><code>string strXML = File.ReadAllText("Xml File Path", Encoding.UTF8);
  System.Text.RegularExpressions.Regex _invalidXMLChars = new System.Text.RegularExpressions.Regex(@"(?&lt;![\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F\uFEFF\uFFFE\uFFFF\00EF\00BB\00BF]", System.Text.RegularExpressions.RegexOptions.Compliled);
  strXML = _invalidXMLChars.Replace(strXML, "");
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Sjapx.jpg" alt="Want to discard this Unicode Characters"></p>