My regex is giving only one sub string. How it should be modified to get all possible sub strings.Regex i wrote is
print re.findall(r'([^aeiou]\w{2})+', 'banana')
o/p: ['ban']
Expected O/p: ['ban', 'nan']
My regex is giving only one sub string. How it should be modified to get all possible sub strings.Regex i wrote is
print re.findall(r'([^aeiou]\w{2})+', 'banana')
o/p: ['ban']
Expected O/p: ['ban', 'nan']