CSV Parsing with double quotes
c#, csv, parsing
Solution
CSV, when dealing with things like multi-line, quoted, different delimiters* etc - can get trickier than you might think... perhaps consider a pre-rolled answer? I use this, and it works very well.
*=remember that some locales use [tab] as the C in CSV...
Problem
I am trying to use C# to parse CSV. I used regular expressions to find `","` and read string if my header counts were equal to my match count. Now this will not work if I have a value like: ``` "a",""b","x","y"","c" ``` then my output is: ``` 'a' '"b' 'x' 'y"' 'c' ``` but what I want is: ``` 'a' '"b","x","y"' 'c' ``` Is there any regex or any other logic I can use for this ?