public static void main(String[] args) { String word="101:102 5"; Pattern pattern = Pattern.compile("[:\t]"); String[] strs = pattern.split(word); for (String s : strs) { System.out.println(s); } }
本文共 296 字,大约阅读时间需要 1 分钟。
public static void main(String[] args) { String word="101:102 5"; Pattern pattern = Pattern.compile("[:\t]"); String[] strs = pattern.split(word); for (String s : strs) { System.out.println(s); } }
转载于:https://www.cnblogs.com/JBLi/p/10816203.html