I have to read and process a file that looks like this:
MASSA TMASS1
uscita da elettrodi:
0 1 0.56705 -19.98160 2.80000 -0.87939 0.66823 -0.63034 0.39513
ingresso tmass1:
0 1 0.56705 -19.13351 2.00000 -0.37791 0.66823 -0.63034 0.39513
MASSA TMASS
uscita da elettrodi:
0 1 2.10543 17.20236 -1.57617 -3.40000 -0.97477 -0.07910 0.20872
MASSA TMASS1
uscita da elettrodi:
0 7 0.00018 -18.08245 -1.30564 3.40000 0.57294 -0.75691 -0.31437
As you can see there are both text and numbers, numbers must be put into two lists depending on the fact that in the above line it says MASSA TMASS1
of MASSA TMASS
and the lines that say uscita da elettrodi:
or ingresso tmass1:
must be skipped.
How can I read it?
EDIT For the above example I expect an output like this:
{{0 1 0.56705 -19.98160 2.80000 -0.87939 0.66823 -0.63034 0.39513},{0 1 0.56705 -19.13351 2.00000 -0.37791 0.66823 -0.63034 0.39513},{0 7 0.00018 -18.08245 -1.30564 3.40000 0.57294 -0.75691 -0.31437}}
{0 1 2.10543 17.20236 -1.57617 -3.40000 -0.97477 -0.07910 0.20872}