I want to split values in CSV file (JAVA). Example of my data;
(All polylines have different number of member.) I split rows seperated by comma using split method in Java. It gets polylines elements seperately with "[" (beacause of comma) but I must get all elements in a one polyline variable. What i want for first row is below;
how can i handle this?
You could construct a scanner with the file to be read, then set its delimiter to some regular expression that excludes any comma in your 'polylines'. It looks like you want to ignore commas if they're preceded by a single closing square bracket, but allow them otherwise.