title: Replacing digits in C# string
body: <p>I am trying to use regular expressions to do some work on strings but I am having some difficulty. My goal is to replace numbers in a string with a character, specifically if there is a group of numbers in the string I want to replace the entire group of numbers with a <code>*</code>. If there is just a single digit I want to replace that with a <code>?</code>. </p>
  
  <p>For example, if I had the string "test12345.txt" I would like to turn that to "test*.txt", but if I have "test1.txt" I would like to turn that to just "test?.txt". </p>
  
  <p>I tried</p>
  
  <pre><code>Regex r = new Regex(@"\d+", RegexOptions.None);
  returnString = r.Replace(returnString, "*");
  </code></pre>
  
  <p>But this replaces replaces even a single digit on its own with a <code>*</code></p>