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

[REBOL] parse or Re:(3)

From: jeff:rebol at: 20-Sep-2000 13:41

Howdy, Ryan:
> > paragraphs: {First paragraph.^/Second "paragraph."^/Third paragraph.} > > parse paragraphs [some [thru {.^/} | thru {."^/} | thru "." end]] > > This returns "true"
Yep, that means that PARSE successfully made it through the whole string. To break up your paragraphs, copy out the parts thru each paragraph ending, like this: pb: copy [] parse paragraphs [ some [ copy part [thru {.^/} | thru {."^/} | thru "." end] (append pb part) ] ] pb == ["First paragraph.^/" {Second "paragraph." } "Third paragraph."]
> Sorry if I'm being a pain, but when I read the "parse > rules" documentation it doesn't make any sense to me. I > can't see the usefulness of returning "true" in this > situation.
No pain whatsoever. I like trying to help. -jeff