Java: splitting a comma-separated string but ignoring commas in quotes

前端 未结 11 1540
广开言路
广开言路 2020-11-21 05:16

I have a string vaguely like this:

foo,bar,c;qual=\"baz,blurb\",d;junk=\"quux,syzygy\"

that I want to split by commas -- but I need to igno

11条回答
  •  被撕碎了的回忆
    2020-11-21 06:15

    http://sourceforge.net/projects/javacsv/

    https://github.com/pupi1985/JavaCSV-Reloaded (fork of the previous library that will allow the generated output to have Windows line terminators \r\n when not running Windows)

    http://opencsv.sourceforge.net/

    CSV API for Java

    Can you recommend a Java library for reading (and possibly writing) CSV files?

    Java lib or app to convert CSV to XML file?

提交回复
热议问题