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

[REBOL] Re: parsing question

From: biuro:terminal:sky:pl at: 19-Nov-2002 11:48

----- Original Message ----- From: "Jan Skibinski" <[jan--skibinski--sympatico--ca]> To: <[rebol-list--rebol--com]> Sent: Tuesday, November 19, 2002 6:02 AM Subject: [REBOL] Re: parsing question
> Hi Alekk, > If I understand you correctly, you have a file with strings like this: > {a b c > d} > and you wish to remove newlines, because otherwise output > looks messy - something like this, correct? > z: "a b c^/ d" > If this is your problem then this simplest possible parser should work > for you: > >> parse z none > == ["a" "b" "c" "d"] > Regards, > Jan
Not exactly - i have tab delimited file (saved from excell) and gennerally want to change from: {a^-b^-"asdfa^/adsfa"^-c} to {a^-b^-asdfaasdfa^-c} but for this {aaa^-b^-b^-"fasdfasdf^/"^-c} my "parser" parse/all plik [ some [to {"} tu: (remove tu) to "^/" tu: (remove tu) to {"} tu: (remove tu)] to end ] doesn't work - it makes {aaa^-b^-b^-fasdfasdf^/^-c} instead {aaa^-b^-b^-fasdfasdf^-c} so i wrote: parse/all plik [ some [to {"} tu: (remove tu replace tu "^/" " ") to {"} tu: (remove tu)] to end ] it works, but is (?) ugly. I've tried some combinations, but nothing work for me regards Alekk