I want to use python re.split()
to split a string into individual words by spaces, commas and periods. But I don't want "1,200"
to be split into ["1", "200"]
or ["1.2"]
to be split into ["1", "2"]
.
Example
l = "one two 3.4 5,6 seven.eight nine,ten"
The result should be ["one", "two", "3.4", "5,6" , "seven", "eight", "nine", "ten"]