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

[REBOL] parse with skip

From: moeller_thorsten::gmx::de at: 21-Aug-2000 13:47

Hi List, I have a file containing the following kind of lines: 9;"1081230012";9999999;1000103;0;84.00;0;9999999;0.84;1;"6";0;991030;0;73.92 ;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? I tried a few other things but they took too long, because the file is about 270.000 lines big. Thorsten