fork(40) download
  1. import re
  2.  
  3. s = "one two 3.4 5,6 seven.eight nine,ten"
  4. print re.split('\s|(?<!\d)[,.](?!\d)', s)
Success #stdin #stdout 0.09s 10840KB
stdin
Standard input is empty
stdout
['one', 'two', '3.4', '5,6', 'seven', 'eight', 'nine', 'ten']