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

[REBOL] Parsing question Re:

From: brett:codeconscious at: 5-Oct-2000 0:47

Short answer - It depends (doesn't it always :) ) Long answer, If I assume there is no relationship between the 5th occurence of something (A) and the 9th occurrence of "whatever" (B) then the answer is no - you probably cannot do it in one rule. The reason being is that you want parse to essentially go back and process the input a second time in order to find B. So, need to call parse once to find (A), again to find (B) and then just do a copy/part A B. If however, there is a relationship, like all 9 occurrences of "whatever" always follow A then yes you can probably do it in a single parse rule. So what you need to do to use parse is to identify the rules that the page structure follows - or at least a pattern that you can exploit. If you have a concrete example, it might help. Brett.