java输出带空格的字符串(1) EYYLTV 2024-06-25 42 阅读1分钟 public class YuGiOh { public static void main ( String[] args ) { String input = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; String regex = "(.{1})"; input = input.replaceAll (regex,"$1 "); System.out.println (input); } }