Does that help:
'20 31 64 33 99 12 32 11 44 16 99 41' splitOn: Character space
bye T.
Em 07-06-2010 16:02, Torsten Bergmann escreveu:
Does that help:
'20 31 64 33 99 12 32 11 44 16 99 41' splitOn: Character space
bye T.
In fact I must ensure everything are digits & spaces... what I did was just parse the whole line (id, date, seq of key codes, final sec code) using:
mx0 := RxMatcher forString: '(\d+)\s(\d\d)/(\d\d)/(\d\d\d\d)\s((\d+\s)+)(\d+)'. mx1 := RxMatcher forString: '(\d+)\s'.
line := anOpenStream nextLine. mx0 matches: line. codes := mx1 matchesIn: (mx0 subexpression: 6). ... 1 to: codes size do: [ :i | newCodes addLast: (codes at: i) asInteger ]. ^newCodes asIntegerArray.
Thanks,
CdAB
squeak-dev@lists.squeakfoundation.org