每两个字符串中插入字符串

         重点是正则

        String input = "abcdefghijk";

        String regex = "(.{2})";
        input = input.replaceAll (regex, "$1 ");
        System.out.println (input);
posted @ 2019-01-24 17:38  渔阳nice  阅读(374)  评论(0编辑  收藏  举报