class L
{
public static void main(String args[])
{
checkTel();
}
public static void checkTel()
{
String tel="13986aa535bb830";
tel=tel.replaceAll("(.)\\1+","$1");
System.out.println(tel);
}
}
正则表达式 替换:将叠词替换成单个字母
最新推荐文章于 2023-11-24 16:36:38 发布