title: Regex : select the x first AND the x last letters to replace them
body: <p>I am trying to select the five first and five last characters to replace them, let's say like for "abcdefgh@abcdefgh.com" to become "*****fgh@abcdefg*****"
  The regex i am using doesn't work properly but I can't understand the reason why. Thanks a lot !</p>
  
  <p><code>const strRe = str =&gt; str.replace(/(^.{5})(.{5}$)/gi, '*****');</code></p>