split a long string of output data separated by space and occasional timestamp.

Hello all!

I have this image program that outputs data which looks like this (w/o the quotes): "00:01:08 8384.12 8373.34 8334.84 8313.32 00:02:37 8284.22 8237.37 8199.34 00:03:13 8178.10 8138.12 8101.23..."

So in English "timestamp number number number number timestamp number number number timestamp number number..."

And the time stamps do not come regularly (semi-regularly, about every 3 seconds) and this is one long line of data like this.

So if I wanted to give each of those numbers an averaged time stamp (by subtracting two neighboring timestamp, and divide by the number of numbers in between these two timestamps and give the first number the first timestamp, the second number that first time stamp plus the averaged value, then the next twice the averaged value, then the next thrice the averaged value, and so on.

Then I have [timestamp, number] pairs.

how can I do this?

Thank You! Nik

Split the string on spaces, then iterate through the array and use slice! to remove successive sequences when the element includes a colon.