[REBOL] Re: Parsing problem
From: brett:codeconscious at: 23-Jul-2001 13:03
Hi Paul,
> a: ['blah ['blah2 'blah3]]
>
> How do I parse the brackets from 'a
'a refers to a block so we're talking block mode. The keyword you want is
INTO.
>> parse a [lit-word! into [2 lit-word!] ]
== true
or a different example:
>> b: [blah [blah2 blah3]]
== [blah [blah2 blah3]]
>> parse b [word! into ['blah2 word!] ]
== true
BTW just to avoid confusion for people reading this thread:
The block in your example that the word 'a refers to does not contain any
brackets - only a word! and a block!. The brackets only exist as actual
brackets in the textual (string!) form (prior to loading by Rebol) of the
code.
HTH!
Brett.