import re
str1 = "test1.25nb 5test .5NB 00.5my_test 5unit 5.6"
print( " ".join(re.split(r'\s*(\d*\.?\d+)\s*', str1)) )
