Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Regexp solution in Clear category for Striped Words by Alex121994
VOWELS = "AEIOUY"
CONSONANTS = "BCDFGHJKLMNPQRSTVWXZ"
import re
def checkio(text):
pat = re.compile(r'''\b(?:([{v}]?(?:[{c}][{v}])+[{c}]?)| # word starts from vowel or is a vc repeat
([{c}]?(?:[{v}][{c}])+[{v}]?))\b # word starts from consonant or is a cv repeat
'''.format(v=VOWELS,c=CONSONANTS), flags=re.I | re.VERBOSE)
return len(pat.findall(text))
Jan. 9, 2017