I have a string variable containing
string = "123hello456world789"
string contains no spaces. I want to write a regex such that prints only words containing(a-z) I tried a simple regex
pat = "([a-z]+){1,}"
match = re.search(r""+pat,word,re.DEBUG)
a match object contains only the word Hello and the word World is not matched.
When is used re.findall() I could get both Hello and World.
My question is why we can't do this with re.search()?
How do this with re.search()?