import restr1 = "test1.25nb 5test .5NB 00.5my_test 5unit 5.6"print( " ".join(re.split(r'\s*(\d*\.?\d+)\s*', str1)) )
Standard input is empty
test 1.25 nb 5 test .5 NB 00.5 my_test 5 unit 5.6
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!