日期:2014-05-20 浏览次数:20623 次
public class Test1 {
public static void main(String[] args) {
String ss = "['气虚质','痰湿质','湿热质']".replace("'", "").replace("[", "").replace("]", "");;
String[] arr = ss.split(",");
for(int i=0;i<arr.length;i++){
System.out.println(arr[i]);
}
}
}
String s="['气虚质', '痰湿质', '湿热质']";
String[] result=null;
String ss=s.substring(2,s.length()-2);
result = ss.split("', '");
String[] words = Arrays.copyOfRange(ss.split("[\\p{Punct}\\s]+"), 1, 4);