Re: Anyone who uses (has used) strTok by Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 18 Nov 2004, at 13:11, John F Dutcher wrote:

> 
> 
> posted by: John F Dutcher <John_Dutcher at urmc.rochester.edu>
> 
> It's certainly true that "explode" nicely allows the preservation of the 
> multiple delimting commas in its returned value.
> 
> To no ones surprise if I write the exploded record to the output file
> after correcting a "found" sequence within it....I get a conspicuous
> Euphoria like nested sequence of atomic values.
> 
> Is there an equivalent of something like "implode" to easily remove the
> braces provided by "explode" so that the corrected record can be 
> written to the output file looking like the others ??

If there is no problem with the solution i provided for parse() earlier, then do
something like this:

pick a char not in the data, like "_", or 1. 
(i have a routine for that, but i do natural language parsing)
when parsing, replace the ,, with ,_, or ,1,
then after deparse, delete that artificial blank field token:

string2 = replace(deparse(string1,","),"_","")
or
string2 = replace(deparse(string1,","),1,"")

presto, all done.

Kat

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu