I am trying to parse a comma separated string using:
val array = input.split(",")
Then I notice that some input lines have "," inside a quotation mark:
data0, "data1", data2, data3, "data4-1, data4-2, data4-3", data5
*Note that the data is not very clean, so some fields are inside quotation marks while some don't
How do I split such line into:
array(0) = data0
array(1) = data1
array(2) = data2
array(3) = data3
array(4) = data4-1, data4-2, data4-3
array(5) = data5