I have a string:
string = "Yellow.car Red.Bag Blue.eyes"
Is there a way to split the string on both periods and whitespaces, but only retain the periods inside the array?
['Yellow','.','Car','Red','.','Bag','Blue','.','Eyes']
A regex for string.split(regexp)
would be preferable.