title: Regex - How to replace each of those digits with one character without erasing any character just around them?
body: <p>I have need to scrub out numeric data from some xml-like strings that are being logged to a minimally secure logging tool.  The data logged may contain some personal information like Phone or Date of Birth, or may contain some financial information like income or other.  </p>
  
  <p>The data is in xml format, but is not guaranteed to be well-formed. But the data I'm scrubbing would be the xml data that would be between the tags.  </p>
  
  <p>For Instance:</p>
  
  <pre><code>&lt;DOB&gt;1/3/1960&lt;/DOB&gt;
  &lt;DOB&gt;12/04/1970&lt;/DOB&gt;
  &lt;DOB&gt;January 4 1988&lt;/DOB&gt;
  </code></pre>
  
  <p>What we would like to do, is scrub all the numeric values from some data.  So our result sets would look like:</p>
  
  <pre><code>&lt;DOB&gt;N/N/NNNN&lt;/DOB&gt;
  &lt;DOB&gt;NN/NN/NNNN&lt;/DOB&gt;
  &lt;DOB&gt;January N NNNN&lt;/DOB&gt;
  </code></pre>
  
  <p>This would help in identifying issues with the calls made with the data, so we could see (for instance) that a phone number contained 9 numbers instead of 10, or DOB year only had 3 digits.</p>
  
  <p>So far, I have this </p>
  
  <pre><code>Regex.Replace(xmlIn, @"(?&lt;=&lt;DOB&gt;)\d+(?=&lt;/DOB&gt;)", "N"
  </code></pre>
  
  <p>But this only works with numeric-only entries, like all 7 digits of phone number crammed together.</p>