title: Regex : Match digits with hyphens and white spaces only
body: <p>I'm trying to match digits with at least 5 characters (for the whole string) connected by a hyphen or space (like a bank account number).</p>
  
  <p>e.g</p>
  
  <p><strong><em>"12345-62436-223434"</em></strong></p>
  
  <p><strong><em>"12345 6789 123232"</em></strong></p>
  
  <p>I should also be able to match</p>
  
  <p><strong>"123-4567-890"</strong></p>
  
  <p>The current pattern I'm using is 
  <code>(\d[\s-]*){5,}[\W]</code></p>
  
  <p>But i'm getting these problems.</p>
  
  <ol>
  <li>When I do this, I match all the white spaces after matching digits with at least 5 digit-characters</li>
  <li><p>I'm going to replace this so I only want to match digits, not the white-spaces and hypens.</p>
  
  <p>When I get the match what I want to do is to mask it like the one below. </p></li>
  </ol>
  
  <p>from "<strong>12345-67890-11121</strong>" to <strong>"*****-*****-*****"</strong></p>
  
  <p>or </p>
  
  <p>from "<strong>12345 67890 11121</strong>" to <strong>"***** ***** *****"</strong></p>
  
  <p>My only problem is that I don't get to match it like what I want to.</p>
  
  <p>Thanks!</p>