[REBOL] Re: Simple parse question
From: lmecir:mbox:vol:cz at: 14-Apr-2003 21:53
Hi Tim,
> Hi Guys;
> I played with Ladislav's code and Tom's code and came
> up with the following:
> ; > ; 'def is a hack of Andrew's 'sub function which automatically
> ; handles local words
> make-words: def[str[string!]][
> either empty? (intersect str rejoin[#"^-" #"^/" #"^M" #"^(page)" " ])[str][
> words: [
> some [
> any { } copy w [to { }](append result w )
> ] copy w to end
> (append result w )
> ]
> result: copy [] parse str words
> result
> ]
> ]
> ; > ; If any sees anything wrong with this, let me know.
what if:
str:
^/a^/b^/"
? Parse/all may be needed sometimes.
Regards
-L