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

[REBOL] Re: Problem with parse

From: brock:kalef:innovapost at: 30-Oct-2008 9:28

Peter, I'm a little confused as to which of the results you don't want. You indicate the second line, but you state in the example that it's "OK". I am not sure if that is a bug or not, but you can simply work around it by doing a replace before doing the parse. The only drawback is you will also have to do a replace to get the " back if they are needed. test: parse/all replace/all {2008-10-30|"This is" NOK|} {"} {~} "|" Here, the replace <your string> {"} {~} will occur prior to the parse. == ["2008-10-30" {~This is~ NOK} ""] The end result will need to have the ~ character replaced with " if they are essential. replace/all test/2 {~} {"} == {"This is" NOK} Or you can do the replace directly into the block like so...
>> test/2: replace/all test/2 {~} {"}
== {"This is" NOK}
>> test
== ["2008-10-30" {"This is" NOK} ""] I hope this helps work around the problem. Brock