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

[REBOL] Complex Series Parsing (Part 2)

From: depotcity:home at: 8-Mar-2001 12:28

Hello all. How do you parse this... y: [ <text> This is some text <tag> with a tag added </tag> and then some text </text> ] So that you get this n: [ <text> This is some text <tag> <text> with a tag added </tag> <text> and then some text ] I tried this... n: [] z: parse y none foreach val z [ either find val "<" [append n val] [append n rejoin [{<text> } val]] ] But then I get n: [ <text> <text> This <text> is <text> some <text> text <tag> <text> with <text> a <text> tag <text> added </tag> <text> and <text> then <text> some <text> text </text> ] So how do I "collect" all the text until the next "tag"? Terry Brownell