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

[REBOL] parse or Re:(2)

From: rryost:home at: 20-Sep-2000 13:54

Hi Ryan: Here's a one liner that may help:
>> st: "abcdef"
== "abcdef"
>> parse/all st "ed"
== ["abc" "" "f"] ; An inclusive OR, I guess.
>> parse/all st "gh"
== ["abcdef"] ; No splitting as neither "g" nor "h" is present.
>> parse/all st "gb"
== ["a" "cdef"] ; Split at the single char that matched. Russell [rryost--home--com]