title: Mask SSN using regular expressions
body: <p>I want to mask the first 5 digits of SSN numbers. I tried this code but it is not working:</p>
  
  <pre><code>var r = new RegExp('?:\d{3})-(?:\d{2})-(\d{4}');    
  var str = '123-12-1234';        
  var result = str.replace(r,'###-##-'); 
  
   result = ###-##-1234
  </code></pre>
  
  <p>Do I need to change the expression?</p>