Java 正则表达式替换:用*隐藏电子邮件地址中的部分字符
Pattern pattern = Pattern.compile("..(?=@)|(?<=@)..");\nMatcher matcher = pattern.matcher(email);\nString result = matcher.replaceAll("");\nSystem.out.println(result);\n\n这样,匹配到的地方就会被替换成。
原文地址: https://www.cveoy.top/t/topic/pwMb 著作权归作者所有。请勿转载和采集!