Re.findall() & Re.finditer()

  • + 0 comments
    import re
    pattern= re.compile(r'(?<=[qwrtypsdfghjklzxcvbnm])[aeiou]{2,}(?=[qwrtypsdfghjklzxcvbnm])',re.IGNORECASE)
    matches= re.findall(pattern, input())
    [print(*matches,sep="\n") if matches else print(-1)]