Raul wrote: > If I start with the text 0,,,34567,,,abcd,,,efg and I use a
I presume this is in response to my most recent post? If so, I'm not surprised. I posted more to inspire further fully-tacit solutions than to actually solve Matthew's problem. Mostly because I don't know enough about that problem. For example: are quotes relevant, as Raul wondered? Should ',',LF be replaced with ',0',LF, as Devon suspects? How big can these files grow (can the raw data itself be bigger than 2GB)? Will there ever need to be longer or more sophisticated substitutions than ',,' ==> ',0,' ? If I were really trying to answer the question as asked, I would recommend something along the lines the rest of you have indicated: read the file in blocks, being careful about block boundaries, and treat each block as true CSV in its full generality (i.e. load 'csv' ). Since you have to loop over blocks anyway, the cost of parsing CSV is negligible (and conveniently sidesteps the issue of the underspecied domain). Chris' post is the closest to how I would approach the problem "in real life". But, as I said, I didn't post to solve the problem "in real life", I posted as if the problem were a puzzle, and the solution had to be fully tacit. So I re-propose the puzzle. I challenge the rest of the Forum to post fully tacit solutions, where elegance is the first priority, efficiency the second, and generality the third. My solution won't win any prizes, but at least it was the first past the post. -Dan ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
