I am looking to be able to break a string into a list around everything that is not a number or a dot. Currently, the split method only provides a way to make a positive match for split, is regular expression the best way for this situation?
For example, for the string "10.23, 10.13.21; 10.1 10.5 and 10.23.32" This should return the list ['10.23', '10.13.21', '10.1', '10.5', '10.23.32']
As such, I believe that the best regular expression to use in this situation would be ... [\d\.]+
Is this the best way to handle this?
source share