[REBOL] Re: A little parse help
From: g:santilli:tiscalinet:it at: 25-Aug-2001 14:53
On 24-Ago-01, you wrote:
SF> thanks, this worked!
I'm happy it was useful.
SF> just two questions,
SF> what's the last :mark1 there for?
To reset the current position for the parser. It's better to
always do that when you modify the string you are parsing. In this
case, it is even necessary unless you want to loop forever (as
others explained in this thread). mark1 is set by CHANGE just
after the change (i.e. after the </a>); this way PARSE will
continue its work from there.
SF> and how do I change it to parse until <br> or a space " "?
This is a little more tricky. If you think it is ok to stop at " "
or just "<" then you can do it this way:
url-chars: complement charset " <"
to "http://" mark1: some url-chars mark2: (
If you need to stop just on space and <br> and not on other tags,
it gets a bit more complicated... but I think you don't need this,
Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/