I have a string that is
mystring = 'Aston VillaLiverpoolMan City'
My goal is to get the output below
"Aston Villa", "Liverpool", "Man City".
ie to spilt on the capital letter when it isnt preceded by a space
I am getting close with re.findall but it is not providing the output that I want
import re
myString = 'Aston VillaLiverpoolMan City'
result = re.findall("(?<!\s)[A-Z][a-z]*",myString)
print(result)
This produces
"Aston", "Liverpool", "Man"
(missing the Villa at the end of Aston and the City at the end of Man)
Thanks!