title: Partially hide email address with RegEx and Javascript
body: <p>I'm trying to using RegEx to hide email addresses, except for the first two characters and the email domain. </p>
  
  <p>The function, in that case, is replacing the characters that I want to keep.</p>
  
  <pre><code>email.replace(/^[A-Za-z]{2}/, "**" ).replace(/@[^:]*/, "**" )
  </code></pre>
  
  <p>What I get: <code>email@domain.com &gt; **ail**</code>
  Expected: <code>em***@domain.com</code></p>
  
  <p>Anyone here who knows how can I change my RegEx to get the expected result?</p>
  
  <p>Thanks!</p>