[REBOL] Re: Bug in Parse result?
From: petr:krenzelok:seznam:cz at: 7-Apr-2008 22:25
Hi Brock,
first, it seems to work here in the console. Second - I will try to show
you an alterantive method. If I am correct, what you do is following
process .... skip thru first tab, copy name to employee, you call
special function which replaces comma in the string with tab and then
you compose resulting newlined string.
What about following?
data: read %my-file
result: copy []
foreach line data [
blk: parse str "^-,"
append result rejoin [blk/1 tab blk/2 tab blk/3 tab blk/4 tab blk/5]
]
write/lines %my-new-file result
or - what about crazy one-liner? :-)
->> str: {7028482^-AVERY, BEVERLY^-86002437^-HILLVIEW}
->> replace/all replace trim/lines copy str "," "" " " tab
== {7028482^-AVERY^-BEVERLY^-86002437^-HILLVIEW}
-pekr-
Brock Kalef napsal(a):