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);
}
}
正则表达式 替换:将叠词替换成单个字母
最新推荐文章于 2022-10-24 11:01:51 发布