[REBOL] Re: Another question
From: joel:neely:fedex at: 15-Feb-2002 21:01
Hi, Andrew,
Andrew Martin wrote:
> The ":ended" has to be in the parse rule and outside the action part. Also
> you have to move the 'ended point as well. Like:
>
> began: "[" copy token to "]" "]" ended: (
> if found? other: select/skip pairs token 2 [
> ended: change/part began first other ended
> ]
> ):ended]
>
> That way the 'parse is set to after the token or the replacement,
> consistently.
>
> I hope that helps!
>
Absolutely! Thanks!
Neeeeeed morrrrrrrre cooooooofffffffeeeeeeee...
-jn-
--
; sub REBOL {}; sub head ($) {@_[0]}
REBOL []
# despam: func [e] [replace replace/all e ":" "." "#" "@"]
; sub despam {my ($e) = @_; $e =~ tr/:#/.@/; return "\n$e"}
print head reverse despam "moc:xedef#yleen:leoj" ;