Recently, I encountered a CSV data separation problem in a JAVA project, which includes character types, numeric types and null values. The character type has double quotes, the numeric type does not have double quotes, and individual character fields also contain delimiters. ",".
"800802","127.0.0.1",,"caller",0.0,0,,,103,"MCX- 1:123,MCX-2:660",-1,""
How to write a regular expression to correctly separate it into
"800802"
"127.0.0.1"
"caller"
0.0
0
103
MCX-1:123,MCX-2:660
-1
I have consulted a lot of information, but I have not tried successfully. Please give me some advice, thank you!
Which CSV lib should I use? Before asking a question, please explain the library you are using