How to extract data from a .txt file that is split by resizing space?
I am trying to extract data (date and time) from a file .txt
, lift it up by one second, and then compare it with the next piece of data so I can see if the date and time is continuous.
For example:
15 6 19 9 12 59.0000000
... some other stuff...
15 6 19 9 13 0.0000000
The problem is that the number of spaces between digits changes (one space if there are two digits to the right of it, two spaces if the data to the right of it has one digit).
How can I extract dates, increment one second and then compare them to the next date in the text without checking for each space change?
+3
source to share
3 answers