Hi community, I want to get the words that have 3 letters repeated but not the e, the others can be. For explample "appropiate" becasue has 3 "p" letters.
But when run the code show me character(0)
stringr::words
pattern_1 <- "(?i)([a-fz])\\1{2}" # `character(0)`
pattern _2 <- "([a-df-zA-DF-Z])\\1{2}" # `character(0)`
pattern_3 <- "(.)\\1{2,}" # `character(0)`
matches <- stringr::str_subset(stringr::words, pattern)
This pattern brings me the letters that repeat 2 times but when I modify it for the letters that repeat 3 times it does not work. It seems strange to me.
pattern_3 <- "(.)\\1{1,}"
matches <- stringr::str_subset(stringr::words, pattern) # see `appropiate`
[1] "accept" "account" "across" "add" "address"
[6] "affect" "afford" "afternoon" "agree" "all"
[11] "allow" "apparent" "appear" "apply" "appoint"
[16] "approach" "appropriate" "arrange" "associate" "assume"
Tnks!