java--字符串隔幾位插入一個字符

public static void main(String[] args) { String replace=「1111111111」; String regex = 「(.{3})」; replace = replace.replaceAll(regex, "$1 "); System.out.println(replace); }web 結果就是:111 111 111 1svg
相關文章
相關標籤/搜索