text files with quotes

David Vaughan drvaughan55 at mac.com
Wed May 15 18:49:01 EDT 2002


On Thursday, May 16, 2002, at 04:56 , Mark Paris wrote:

> Anyone have a good method of parsing a text file that is delimmited by
> commas, yet has quotes (") surrounding SOME of the records, which in 
> turn
> may have commas inside of them (such as a notes field)?  (!)
>
> The only routine I made for this was long and ugly, taking a second per
> record.  I first replaced commas inside of quotes with a blank space, 
> then
> got rid of the quotes, then parsed by comma.

Mark

I am not sure there is a trivial way of doing this but your second per 
record sounds vastly too long to me. Rev is very fast at text processing 
in my experience, after a little familiarity with its nifty features. 
Are you able to post a sample of your data and your script (or a 
fragment) to handle it? I have some thoughts about it but need some more 
material to be sure of what might work well. I am prepared to bet that, 
if not me, then someone will pounce with an improvement for you.

regards
David
>
> Is there a routine I might be missing?  Thanks!
>
> Mark
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list