How to corretly parse CSV file with fields with embedded comma characters
1033781Jun 21 2009 — edited Jun 22 2009Hi,
The CSV file format allows comma's to be embedded in field values so long as they are included within quoted strings.
e.g.
full name, "34 George St, Sydney", something else
is a record that consists of exactly 3 field values.
My problem is how can I create an MFL or otherwise to describe a CSV file format that deals with this situation.
My naive attempts at defining an MFL of comma delimited values does not deal with comma's inside quotes (i.e. it won't ignore them).
Is there a way or am I doing something silly? It seems to me MFL is more for binary formats than CSV's as it seems a little unnatural for defining CSVs..
Any help much appreciated