I have a string (which is different everytime but follows a similar format):
54321.0 67778.0000002 0.3673987009 1 1017.750 88.370 512 7 1 H8711-3040
I'm trying to use regular expressions to be able to pick out any one of those entries in my python code, but I'm struggling.
I'm trying
testRegex = re.compile(r'\w.+\w')
out = testRegex.search('# 53421.0 67778.0000002 0.3673987009 1 1517.750 88.370 512 7 1 J1745-3040')
print(out.group())
But I'm just getting the whole line returned. I can see why it does that but not sure how to just pick out "512" for example (whatever number might be in its place).