William James <w_a_x_man@yahoo.com> wrote:
+---------------
| rpw3@rpw3.org (Rob Warnock) wrote:
| > It handles your sample input:
| > > (parse-csv-line (read-line))
| > "He said ""Stop, thief!"" and collapsed.",88,"x,y"
| >
| > ("He said Stop, thief! and collapsed." "88" "x,y")
|
| I think that it should be
| ("He said \"Stop, thief!\" and collapsed." "88" "x,y")
+---------------
Oops! Sorry, you're right. The specification I coded that to
didn't support doubling double-quotes to quote them. For the
data it was dealing with, it was considered a "feature" that
an input string like this:
some "text, here," with "commas, yes?",more text here
would parse as this:
("some text, here, with commas, yes?" "more text here")
But as I said, "[it] may need tweaking for some applications"... ;-}
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607