0

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']

su_py
  • 31
  • 1
  • 8

0 Answers0