字符串分隔(求正则表达式)
public class SplitStr
{
public static void main(){
String str= "1188665760|0.00638|1|Default status|43944|11432|2048000 ";
String [] strArr=str.split(正则表达式);
System.out.println(strArr.length);
}
}
说明:
求正则表达式!
把str字符串分隔成(1188665760,0.00638,1,Default ,status,43944,11432,2048000)组成的数组!
------解决方案--------------------String [] strArr=str.split( "[|] ");