RegEx - Java Split Command Parsing Csv File

I have a CSV in this below format 11000,Christopher,Nolan,MR.,Inception,25993,France,"Lefoullon,Paris",920,Director,*461-7755,33-461-7755,12175,"O'Horner, James",12300,"Glebova, Nathalie",,,Capital,NEW In this link @Mark Byers and @R. Bemrose suggested `String[] tokens = line.split(",(?=([^\"]*\"[^\"]*\")*[^\"]*$)", -1);` But if you notice carefully in the above CSV, you will find a name with `"O'Horner, James"` is causing problems and its throwing `ORA-0917: missing comma` error. Is there a way to avoid it or the reg-ex has to be corrected? Kinda confused :-o

以上就是RegEx - Java Split Command Parsing Csv File的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准