Which is actually part of why I clicked into the article - I expected it to get into the complexity of trying to detect if 'y' was a vowel as part of the search, and instead got a mostly banal python text search article.
You can see the technical rules for when 'Y' is a vowel in english here:
https://www.merriam-webster.com/grammar/why-y-is-sometimes-a...
Y is considered to be a vowel if…
The word has no other vowel: gym, my.
The letter is at the end of a word or syllable: candy, deny, bicycle, acrylic.
The letter is in the middle of a syllable: system, borborygmus.
This is also why Unicode doesn’t have a “vowel” character property. Otherwise you could use a regex like `\p{Vowel}`.
The rule in English is not "all true words contain a vowel" it's that all words contain a vowel sound.
Except the ones that don't, because English is a very messy language.
TIL: When y forms a diphthong—two vowel sounds joined in one syllable to form one speech sound, such as the "oy" in toy, "ay" in day, and "ey" in monkey—it is also regarded as a vowel. Typically, y represents a consonant when it starts off a word or syllable, as in yard, lawyer, or beyond.