title: Picking first X digits in string and replace each digit with Character
body: <p>I'm trying to replace all digits in a string with an *.</p>
  
  <p>Right now i have this</p>
  
  <pre><code>val regex = "^[\\d+].{8}"
  val pattern = Pattern.compile(regex)
  code = code.replace(pattern.toRegex(), "*** *** *")
  </code></pre>
  
  <p>It kinda works, but i want to have <code>*</code> instead of <code>"*** *** *"</code>
  so the idea is to replace single digits instead of a block.</p>
  
  <p>example string: </p>
  
  <blockquote>
    <p>123 456 789 0</p>
  </blockquote>