Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
1-liner: re Context of reference to group \g<0> == \1 solution in Creative category for Bird Language by Stensen
import re
translate = lambda t: re.sub(r'([^aeiouy ])[aeiouy]', r'\1', re.sub(r'([aeiouy])\1{2}', r'\1', t))
Sept. 25, 2020