From: Mark Thomas Date: 2009-01-13T23:34:18+09:00 Subject: Re: Complex CSV parsing On Jan 13, 8:42 am, Stuart Clarke wrote: > I am trying to parse data from a file where the values are common > seperated, however there is slightly more to the file than just commas, > see below > > for > (;;);{"t":"msg","c":"p_114000000","ms":[{"type":"msg","msg":{"text":"you > around"}]} That's not a CSV file. It looks like some sort of serialized data structure. If you know how it was serialized, you should be able to easily restore the structure. If not, you can use Treetop to specify the grammar including the balanced delimiters {}, (), and [], which apparently take precedence over the commas, and perform the parsing.