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

[REBOL] Splitting string based on substring separator

From: fuka::fuxoft::cz at: 22-Dec-2002 0:48

Let's say I've got this string HELLOsepP E O P L EsepHOWsepAREsepYOU and I want to split it to substrings based on the separator string (in this case, "sep"). So I want this result: ["HELLO" "P E O P L E" "HOW" "ARE" "YOU"] I know I can do this using parse and build the resulting block programatically, but isn't there a simpler and cleaner solution? For example, if the separator was just one character long, I know I'd just write: result: parse/all string-to-parse separator-character Thanks -- Frantisek Fuka (yes, that IS my real name) (and it's pronounced "Fran-tjee-shek Foo-kah") ---------------------------------------------------- My E-mail: [fuka--fuxoft--cz] My Homepage: My ICQ: 2745855