Trying to find the longest consecutive set of vowels in a string.
I have a very long string.
random_letters <- readr::read_lines("https://byuistats.github.io/M335/data/randomletters.txt")
I have stripped the string of all spaces and periods.
random_letters %>% str_replace_all(., fixed(" "), "") %>% str_replace_all('\\.', '')
I am now trying to find every single time a vowel, or combination of vowels occurs, and then identify the longest one.
so if the string looked like
string <- c("abcnduakngoaibhui")
the output would be
"a" "ua" "oai" "ui