String phone = "13100001111"; String phoneResult = phone.replaceAll("(\\d{3})\\d{4}(\\d{4})","$1****$2"); System.out.println(phoneResult);
手机号中间屏蔽,正则表达式
最新推荐文章于 2023-05-06 09:40:15 发布
String phone = "13100001111"; String phoneResult = phone.replaceAll("(\\d{3})\\d{4}(\\d{4})","$1****$2"); System.out.println(phoneResult);