fork download
  1. import re
  2. line = "-1 1:-0.294118 2:0.487437 3:0.180328 4:-0.292929 5:-1 6:0.00149028 7:-0.53117 8:-0.0333333"
  3. for match in re.finditer(r"(-?\d\.\d+)", line, re.DOTALL | re.MULTILINE):
  4. print match.group(1)
Success #stdin #stdout 0.01s 7736KB
stdin
Standard input is empty
stdout
-0.294118
0.487437
0.180328
-0.292929
0.00149028
-0.53117
-0.0333333