手机号中间四位替换为****

String phoneNumber = phone.replaceAll("(\\d{3})\\d{4}(\\d{4})","$1****$2");

posted on 2021-12-21 11:40  RedBackIce  阅读(24)  评论(0编辑  收藏  举报