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

[REBOL] Re: Parsing optional tags

From: geza67:freestart:hu at: 4-Nov-2001 23:53

Hello Ladislav,
> i-tag: [copy collect to </i> </i>] > not-i-tag: [copy collect to </b>] > b-tag: [[<i> (following: i-tag) | (following: not-i-tag)] following (append > collects collect) </b>] > htmlrule: [[thru <b> (follow: [b-tag htmlrule]) | to end (follow: [none])] > follow] > parse html htmlrule
Thank you for the working version but I just can't believe it has to be so complicated - building a (in a way) complete syntax to strip off two lousy HTML-tags ... :-( If this is the more-or-less only "obvious" way to do it in the REBOL parse dialect, I'll better stick to the old-fashioned way and build a regex and feed it through sed/awk/vim or something like that. -- Best regards, Geza mailto:[geza67--freestart--hu]