Match pattern of letters considering blanks within each element of a character vector, allowing counted characters between and around each letter. Used as an auxiliary function for the Scrabble family of functions.
Examples
x <- c("aaaa", "bbbb", "baba", "aabb", "a", "ab")
grepl_letters(x, "ab")
#> [1] FALSE FALSE TRUE TRUE FALSE TRUE
grepl_letters(x, "_ab")
#> [1] FALSE FALSE TRUE TRUE FALSE FALSE
grepl_letters(x, "a_a")
#> [1] TRUE FALSE TRUE FALSE FALSE FALSE
grepl_letters(x, "c")
#> [1] FALSE FALSE FALSE FALSE FALSE FALSE