标签: java regex
我的字符串如下:
"18","1st",0,"Beattie, Mr Thomson",36.0000,"Cherbourg","Winnipeg, MN","C-6","","","male"
我想用逗号分割字符串,使用split函数忽略引号内的逗号。
我试过这个
line.split( “(:(:?\” \ W * \ “| \ d *)),(:(:?\” \ W * \ “| \ d *))”)< / p>
答案 0 :(得分:0)
有足够的现有模块可以导入CSV文件。例如https://commons.apache.org/proper/commons-csv/