*Right* then, try this:
; data must start with newline to help the parse rule
string: {
454 en tw
395 en th
313 kai o
175 oi de asdf
314 eij thn
174 eij ton
124 kai ouk dffd fder
123 kai thn
219 ek tou
160 kai en tty ttq qzfcv
}
blk: make block! 1000 ; or 2 * number of lines in the string
; that's instead of [copy []], a speed increase for insert
whitespace: charset " ^-" ; spaces and tabs
parse/all string [
some [
"^/" ; each line starts with a newline
some whitespace
copy number to " "
(insert tail blk to integer! number)
" "
copy string to "^/" ; the rest of the line
(insert tail blk string)
]
]
sort/skip blk 2
foreach [one two] blk [print [one two]]
Anton.
> Hi Anton,
>
> At 05:08 AM 9/6/2002 +1000, you wrote:
> >Here's what was meant, I think.
> >
> >string: {
> > 454 en tw
> > 395 en th
> > 313 kai o
> > 175 oi de
> > 314 eij thn
> > 174 eij ton
> > 124 kai ouk
> > 123 kai thn
> > 219 ek tou
> > 160 kai en
> >}
> >
> >blk: parse string none ; split at whitespace
> >
> >sort/skip blk 3
> >
> >foreach [one two three] blk [print [one two three]]
> >
> >Anton.
>
> Oh, I see. But there is a problem in that some of the lines are
> as follows:
>
> 003 apo twn presbuterwn kai arcierewn kai grammatewn
> 002 umwn merimnwn dunatai prosqeinai epi thn hlikian
> 002 umin anasthsei kurioj o qeoj umwn ek twn adelfwn
>
> with an unknown number of spaces. Sorry, this is my fault for not
> noticing that all the sample data I originally gave contained a
> number and
> two words, and therefore was not representative of all the data.
>
> Louis
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.