//134****6666
mobileNo.replaceAll("(\\d{3})\\d{4}(\\d{4})","$1****$2");
//1402*****6666
idNo.replaceAll("(\\d{4})\\d{10}(\\w{4})","$1*****$2");
//3******7@qq.com
email.replaceAll("(\\w?)(\\w+)(\\w)(@\\w+\\.[a-z]+(\\.[a-z]+)?)", "$1****$3$4");
$1、$2表示正则表达式{}里面的匹配内容