fork download
  1. import re
  2. text = 'this is a string (0.7000) $0.9 80% 900000 0.9 chars not numbers.'
  3. print(filter(None, re.split(r"\s*(\(?\$?[0-9.,]+[.%)]?)\s*",text)))
Success #stdin #stdout 0s 23304KB
stdin
Standard input is empty
stdout
['this is a string', '(0.7000)', '$0.9', '80%', '900000', '0.9', 'chars not numbers', '.']