I have email and want to replace each character between first letter and @ to *. Example:
john.smith@gmail.com -> j*********@gmail.com
Here is my code, but it produce one star instead of many - I stuck on it:
let h="john.smith@gmail.com".replace(/(.)(.*)@/,'$1*')
console.log(h);
Any solutions?