title: PHP regex expresion to mask multiple email
body: <p>I have a email in this format. I tried the regex below, i unable to mask the email after semicolon.</p>
  
  <pre><code>var email = "testing.123@gmail.com;testing-test2@gmail.com";
  a
  //using this regex
  preg_replace("/(?:(?:^|(?&lt;=@))([^.@])|\G(?!\A))[^.@](?:([^.@])(?=[.@]))?/","$1*$2",email);
  a
  </code></pre>
  
  <p>The output will be </p>
  
  <pre><code>t*****g.123@g***l.com;testing-test2@g***l.com
  </code></pre>
  
  <p>My expected output</p>
  
  <pre><code>t*********3@g***l.com;t***********2@g***l.com
  </code></pre>
  
  <p>How can i achieve that? Or is there any more efficient way to do this? Thanks.</p>