--- Day 5: Doesn't He Have Intern-Elves For This? ---
Santa needs help figuring out which strings in his text file are naughty or nice.
A nice string is one with all of the following properties:
- It contains at least three vowels (
aeiouonly), likeaei,xazegov, oraeiouaeiouaeiou. - It contains at least one letter that appears twice in a row, like
xx,abcdde(dd), oraabbccdd(aa,bb,cc, ordd). - It does not contain the strings
ab,cd,pq, orxy, even if they are part of one of the other requirements.
For example:
ugknbfddgicrmopnis nice because it has at least three vowels (u...i...o...), a double letter (...dd...), and none of the disallowed substrings.aaais nice because it has at least three vowels and a double letter, even though the letters used by different rules overlap.jchzalrnumimnmhpis naughty because it has no double letter.haegwjzuvuyypxyuis naughty because it contains the stringxy.dvszwmarrgswjxmbis naughty because it contains only one vowel.
How many strings are nice?