Quote (carteblanche @ Sep 20 2015 07:05pm)
1. If the pattern vowel-consonant-consonant-vowel is found, hyphenate between the two consonants. Use ‘a’, ‘e’, ‘i’, ‘o’, ‘u’, and ‘y’ as vowels, and all other characters as consonants.
2. If the pattern vowel-consonant-vowel is found, hyphenate before the consonant unless the second vowel is an ‘e’ and occurs at the end of the word.
3. The following character sequences are never divided by hyphens: “qu”, “tr”, “br”, “str”, “st”, “sl”, “bl”, “cr”, “ph”, “ch”. For the purposes of rules 1 and 2, each of these are single consonants.
4. Upper and lower-case distinctions are ignored for the purpose of applying the above rules. However, the case in the input must be preserved in the output.
these are the rules for where to insert hyphens in the string.