看板 java 關於我們 聯絡資訊
以下是我的懶惰方法: public class Test3 { public static void main(String[] args) { String str = "[abc (1,2,3)]"; String[] array = str.split("\\W+"); for(String s : array) System.out.println(s); } } 只是陣列第一個會是空字串,哈~ 希望會有幫助... ^^ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.113.65.151