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

[REBOL] Re: Parsing query. Better example.

From: brett:codeconscious at: 28-Feb-2003 11:31

Doens't look like a valid string Terry (ie is the "s part of the text you are parsing?). There could be a few ways of approaching it, once the assumptions/constraints are known. Here is one example (which assumes that "abc" is followed by a single numerical digit): result: copy [] parse str [any [ copy item ["abc" skip] (append result item) | skip ] ] ?? result You might be interested in this: http://www.codeconscious.com/rebol/parse-tutorial.html Brett. ----- Original Message ----- From: "Terry Brownell" <[tbrownell--L3TECHNOLOGY--COM]> To: <[rebol-list--rebol--com]> Sent: Friday, February 28, 2003 11:00 AM Subject: [REBOL] Re: Parsing query. Better example. This is a better example... str: Some text... Section 1 abc1, blah blah => abc2, blah, blah blah => abc3, blah blah, blah => abc4, blah, blah Section 2 abc5, blah blah, blah => abc6, blah blah, blah => abc7, blah, blah Where I end up with... n: ["abc1" "abc2" "abc3" "abc4" "abc5" "abc6" "abc7"] A wee far cry from the last example. TB