split string on comma, but not commas inside parenthesis

后端 未结 3 2076
没有蜡笔的小新
没有蜡笔的小新 2021-01-23 23:09

Now I have a task about Java IO , I need to read file line by line and save this data into database, But Now I got a problem.

\"desk\",\"12\",\"15\",\"(small         


        
3条回答
  •  情书的邮戳
    2021-01-24 00:02

    or, if Java must be:), you can split by "\\s*\"\\s*,\\s*\"" and add afterwards the " if necessary to the beginning of the first field and to the end of the second. I put \s because I see that you also have blanks separators - 15",blank"(small

提交回复
热议问题