extract by delimiter

DunbarX at aol.com DunbarX at aol.com
Tue Dec 28 18:35:29 EST 2010


Tony,

If you have a field "data" with your text, and a fld "accum",
then in a button somewhere:

on mouseUp
    put fld "data" into temp
    
    set the itemdelimiter to quote
    repeat with y = 1 to the number of lines of temp
       put item 1 to 2 of line y of temp & ":" & item 3 to 4 of line y of 
temp & ":" & item 5 to 6 of line y of temp into line y of accum
    end repeat
    replace quote with empty in accum
    put accum into fld "accum"
end mouseUp

You get your data parsed with colons. I tried to parse it with Colins, but 
that feature is not yet supported.

Craig



More information about the Use-livecode mailing list