Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: newlines

From: lmecir:mbox:vol:cz at: 8-Nov-2001 13:39

I offer another one: method3: [any [thru ".." t: any #"." u: (remove/part t u) :t] to end] parse/all s method3 ----- Original Message ----- From: "Brett Handley" <[brett--codeconscious--com]> To: <[rebol-list--rebol--com]> Sent: Thursday, November 08, 2001 12:47 PM Subject: [REBOL] Re: newlines Hi Ladislav,
> == "..a...bcd.s.f.g.k.l.m.n.o.p.."
Well that was a bit of a blow. Thanks for picking it up. I had forgotten that I had made parse's index into the string out of whack when I did the remove. Here is the fixed (and no doubt slightly slower) versions: method1: [ any [ ".." mark1: any #"." mark2: (remove/part mark1 mark2) :mark1 | skip] ] parse/all s method1 other-char: complement charset {.} method2: [any [some other-char | ".." mark1: any #"." mark2: (remove/part mark1 mark2) :mark1 | skip ] ] parse/all s method2 Regards, Brett