title: java Regex: replace all numerical values with one number
body: <p>I have a simple line of text which might include numbers like "12.3" or "1983" or "5/8".
  Whenever any number appears, I just need to replace with a fixed character, say the digit "8".</p>
  
  <p>I've been fiddling about with Regex in Java, with things like this:</p>
  
  <pre><code>String line = str.replaceAll("[0-9]+/*.*[0-9]*", "8");
  </code></pre>
  
  <p>but to no avail.</p>
  
  <p>Any idea what the correct pattern should be?</p>