[REBOL] Re: Parsing until the end
From: g:santilli:tiscalinet:it at: 6-Jan-2003 1:26
Hi Frantisek,
On Sunday, January 5, 2003, 9:21:23 PM, you wrote:
FF> my-magic-split "XYhelloXYpeopleXYXYhowXYareXYyouXY" "XY"
FF> should be: "howXYareXYyou" ;notice there's no "XY" at the end.
string: "XYhelloXYpeopleXYXYhowXYareXYyouXY"
rule: [thru "XYXY" mark1: some [text mark2: "XY"]]
text: [to "XY"]
if parse/all string rule [copy/part mark1 mark2]
>> if parse/all string rule [copy/part mark1 mark2]
== "howXYareXYyou"
>> string: "XYhelloXYpeopleXYXYhowXYareXYyou"
== "XYhelloXYpeopleXYXYhowXYareXYyou"
>> if parse/all string rule [copy/part mark1 mark2]
== none
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r