okay maybe I was being too generic.
Example, parsing a web page to locate the fifth table. This basically
involves looking for the fifth occurrence of "<table>" and then the second
occurrence of "</table>" (as there is an embedded table in one of the
cells).
<html>
<body>
<table></table>
<table></table>
<table></table>
<table></table>
<table>
<tr>
<td><table></table></td>
</tr>
</table>
</body>
</html>
The content I'd like to be copied is "<tr><td><table></table></td></tr>"
(don't ask why I'd want this)
Hope that clears up what I'm trying to do. Cheers,
Jamie
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 04, 2000 7:48 AM
> To: [EMAIL PROTECTED]
> Subject: [REBOL] Parsing question Re:
>
>
> 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
> >
> >
>
>
Jamie Lawrence.vcf