Phillip wrote:
> There's a small problem with Steve's parser in that it doesn't handle
> cases where the CSV field is quoted: "my stuff","some, or other stuff".
Yep. Several others have privately pointed that out to me, also. :)
I did leave myself an out, fortunately, with the statement about
"embedded separators" making it harder. I hadn't realized that there
was a convention about using quotes to mask embedded separators,
and was worried about handling other ways, such as:
S&P 500 INDEX\,RTH,^GSPC,1166.36,0.00
The 2nd version I posted earlier today handles quoted fields correctly,
including nested fields [he claims...], such as:
"this,""has,nested"",fields"
but had one typo. The line:
sep := zapPrefix(!args, "--separator=")
should be:
sep := zapPrefix(!args, "--separator=") | ","
Without that fix you have to give the "--separator=,"
option to get comma-separated-value parsing.
--
Steve Wampler -- [EMAIL PROTECTED]
The gods that smiled on your birth are now laughing out loud.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group