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

[REBOL] AW: parse with skip Re:

From: moeller_thorsten:gmx at: 21-Aug-2000 15:10

Hi Pekr, thanks for your tip but..... ......that really doesn't work. With your solution "text has no value". What i tried, is to hop over the semikolons for n times and read the contens until the next semikolon. As there are more than one field to be modified as well field 13 and 19 )the solution to skip over the semikolon may be the best. If i understand the guide correctly, Rebol has to ignore everything before the semikolon, but in this case it doesn't. No idea! Thorsten -----Ursprungliche Nachricht----- Von: [Petr--Krenzelok--trz--cz] [mailto:[Petr--Krenzelok--trz--cz]] Gesendet: Montag, 21. August 2000 13:51 An: [list--rebol--com] Betreff: [REBOL] parse with skip Re: [moeller_thorsten--gmx--de] wrote:
> Hi List, > > I have a file containing the following kind of lines: >
> ;0.84;9;"L";991030;0;108;123;0;" " > > With this line i like to get rid of the leading "1" ( should be yymmdd > 00/01/03 )in the 4th field. For this i like to use the following code: > > val: 1000000 > > parse line [skip ";" 2 thru ";" copy text to ";" (if greater? to-integer > text val [remove/part text 1])] > > For most lines in the file this works fine, but if the number before the > first semikolon changes to over 9 ( e.g. 21 ) this won't work anymore. > > Does anyone know why? >
somenum: charset "0123456789" parse line [skip somenum ";" .... Cheers, -pekr-