From: Iain 'Spoon' Truskett Date: 2003-02-21T23:55:05+09:00 Subject: Re: Regexp help: Parsing a CSV file * Brian Candler (B.Candler@pobox.com) [22 Feb 2003 01:41]: [...] > "this","is\nan example" > but then that's not CSV. How about saving as XML instead? :-) Well, definitions of CSV are somewhat flexible. Some programs happily accept C escape sequences within the field values. Some don't. Some will regard a raw new line while in quotes. Some won't. Some will allow single quotes as well as double quotes. Some won't. Some do "" to indicate a " inside "...". Some do \". Some do both. All in all, for a "simple" file format, it's not really that standard =) I'm sure I saw a parser somewhere that had most of those as options, for both import and export. cheers, -- Iain. who just spent the past half hour or so converting perl's Text::CSV to ruby. A pointless exercise beyond getting some ruby practice in.