I am trying to mask email address with "*" but I am bad at regex.
input : nileshxyzae@gmail.comoutput : nil********@gmail.com
My code is
String maskedEmail = email.replaceAll("(?<=.{3}).(?=[^@]*?.@)", "*");
but its giving me output nil*******e@gmail.com
I am not getting whats getting wrong here. Why last character is not converted?Also can someone explain meaning all these regex