标签:style http java io html 代码 ar line
代码:
String str = "the music made it hard to concentrate";
String delims = "[ ]+";
String[] tokens = str.split(delims);
结果为:
the, music, made, it, hard, to, concentrate
原因:
String.split(String regex):参数是一个正则表达式
转自:http://pages.cs.wisc.edu/~hasti/cs302/examples/Parsing/parseString.html
Java 的 String.split 函数,消除空字符串,布布扣,bubuko.com
标签:style http java io html 代码 ar line
原文地址:http://www.cnblogs.com/keepthinking/p/3880028.html