The record I'm trying to split is formatted as follows:
987,"This is second field, it contains multiple commas, but is enclosed in quotes, 88123, 99123", 1221, lastfield
I am using the code:
char[] delimiters = new char[] {',' }; string[] parts = line.Split(delimiters, StringSplitOptions.None);
I get split results, but do not process the delimited field with a quote as one field. I need to get a result of 4 fields, but I get a field for each comma. How to configure / change the code to get the desired results?
source share