1

来源:互联网 发布:js数组包含另一个数组 编辑:程序博客网 时间:2024/06/05 02:04
public void test3(){    String s = "我我....我...我.要...要要...要要...要学....学学..学.编..编编.编.程";    String s2 = s.replaceAll("\\.","");    System.out.println(s2);    String s3 = s2.replaceAll("(.)\\1+","$1");    System.out.println(s3);}
原创粉丝点击