I have a line in a text file which is as follows:
0 {1.H1'} 5.82020 0.05000 0.10000 ++ {0.0} {} {2.H8} 7.61004 0.05000 0.10000 ++ {0.0} {} 0.0 100.0000 0 {} 0 0 0
The code I used for picking out the values 5.82020
and 7.61004
are as follows:
float_num = re.findall("[\s][1-9]{1}\.[0-9]+",line)
If instead I wanted to pick out the words 1.H1'
and 2.H8
, what should I change in my code?
Also, there are multiple lines in my text file, I just picked one out as an example.