Hi Andrew,
there's an error in here. The parse should read:
parse line [thru "key1=" copy key1 to "key2=" thru "key2=" copy key2 to "key3="
thru "key3=" copy key3 to end]
Without the 'skip s. skip advances one character, so the following "key..."
string can not be found any more.
regards,
Ingo
Those were the words of Andrew M. Grossmann:
> try something like:
>
> foreach line read/lines %data.txt [
> parse line [thru "key1=" copy key1 to "key2=" skip thru "key2=" copy key2 to "key3="
>skip thru "key3=" copy key3 to end]
> ; do stuff with keys here
> ]
>
> Take a look at the docs on parse as well.
>
> --
> Andrew Grossman
>
> --- You wrote:
> I am new to Rebol and need some help dealing with strings. I've looked around
> for examples but can't find any - so I would appreciate it if you could give me
> some advise or point me to an example. Here's th
> --- end of quote ---
>
Hi Rebols,
regards,
Ingo
-- _ . _
ingo@)|_ /| _| _ <We ARE all ONE www._|_o _ _ ._ _
www./_|_) |o(_|(/_ We ARE all FREE> ingo@| |(_|o(_)| (_|
http://www.2b1.de/Rebol/ ._| ._|