Hello [EMAIL PROTECTED],
Try this:
REBOL []
table-rule: [thru "<table>"]
table-rule-copy: [thru "<table>" copy text to "</table>"]
tables-rule: [
11 table-rule
1 table-rule-copy
to end
]
parse read %test.html tables-rule
print text
a test file is attached.
Note that if you'd like to handle stuff like "<table border=0>", you'd need to modify
the rules a bit:
(not testet)
table-rule: [thru "<table"]
table-rule-copy: [thru "<table" thru ">" copy text to "</table>"]
Best regards
Thomas Jensen
On 01-Oct-00, [EMAIL PROTECTED] wrote:
> Thanks but if you don't want copy text between 1 and 11 but only on the 12th
> is it possible ?
>
> ----- Message d'origine -----
> De : <[EMAIL PROTECTED]>
> À : <[EMAIL PROTECTED]>
> Envoyé : dimanche 1 octobre 2000 19:53
> Objet : [REBOL] Repeat pattern Re:
>
>
>> On Sun, 01 Oct 2000, you wrote:
>>> Let suppose this rule:
>>> 12 [thru "<table>" copy text to "</table>"]
>>>
>>> How to modify the syntax if you want to do it not 12 times but only the
>>> 12th time ?
>>
>> Not tested but...
>>
>> counter: 0
>> tables: []
>> parse mypage [some [thru "<table> copy text to "</table>"
>> (if (counter // 12) = 0 [append tables
> text]
>> counter: counter + 1)
>> ]
>> ]
>>
>