[REBOL] Re: parsing html : is this correct ?
From: anton:lexicon at: 7-Jun-2002 3:30
Jose,
Well done, you have discovered a bug in 'parse,
I think. (It could also be 'remove ?).
The following script shows the problem.
Note that html and html2 are different by one character,
the 'x' (although it doesn't seem to matter which character
it is, just the length of the string.)
html: {<script ------------------></script><script>I should be
removed</script>}
html2: {<script -----------x-------></script><script>I should be
removed</script>}
html rule: [
any [
(print "~~~ any block ~~~")
to "<script" mark1: (?? mark1)
thru "/script>" mark2: (
?? mark2
remove/part mark1 mark2
?? mark1
)
:mark1
(?? mark1)
] to end
]
parse/all html rule
prin "^/"
parse/all html2 rule
prin "^/"
?? html
?? html2
halt
I would like to analyse this further before making a
bug report to feedback. Better to have more information.
Anybody have any comments about this?
Anton.