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

[REBOL] Re: Reverse Parsing

From: al:bri:xtra at: 28-Sep-2001 8:25

> Is there an easy, obvious, way that I can't see to parse backwards with
alternation capabilities? For example, I want to find the last word typed, so I search backwards from the caret position looking for any [tab space return]. I can search backwards with find, but it doesn't allow alternation (does it?). I can parse forwards, ignoring all but the last item I find, but is that the best approach? Would reverse-ing the string first, then parse-ing work for you?
>> s: "a word at last ^-"
== "a word at last ^-"
>> head reverse s
== "^- tsal ta drow a" Andrew Martin ICQ: 26227169 http://zen.scripterz.org