Short answer - It depends (doesn't it always :) )

Long answer,

If I assume there is no relationship between the 5th occurence of
"something" (A) and the 9th occurrence of "whatever" (B)
then the answer is no - you probably cannot do it in one rule. The reason
being is that you want parse to essentially go back and process the input a
second time in order to find B.  So, need to call parse once to find (A),
again to find (B) and then just do a copy/part A B.

If however, there is a relationship, like all 9 occurrences of "whatever"
always follow A then yes you can probably do it in a single parse rule. So
what you need to do to use parse is to identify the rules that the page
structure follows - or at least a pattern that you can exploit.

If you have a concrete example, it might help.

Brett.

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 05, 2000 5:52 AM
Subject: [REBOL] Parsing question


> is it possible to parse a page with the following pseudo-rule:
>
> copy from the 5th occurrence of "something" to the 9th occurrence of
> "whatever"
>
> I have found lots of references to thru and to but I can't quite get my
head
> around how to use them to perform this.
>
> Many Thanks,
>
> Jamie
>
>

Reply via email to