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

[REBOL] Problem with parse

From: maillist::peter::home::se at: 30-Oct-2008 13:52

Hello! I have a databasefile built up by lines with the following structure: {<date>|<string>|<url> I parse each line using: parse/all <line> "|" This normally works as expected but with the second line below it seems like the parse does something wrong. Or do I miss something?
>> parse/all {2008-10-30|This is OK|} "|"
== ["2008-10-30" "This is OK" ""]
>> parse/all {2008-10-30|This "is" OK|} "|"
== ["2008-10-30" {This "is" OK} ""]
>> parse/all {2008-10-30|"This is" NOK|} "|"
== ["2008-10-30" "This is" " NOK" ""] It seems that the problem is when a | is directly followed by a ". Anyone with a solution? Best regards, Peter Carlsson