Мы можем использовать str_detect
library(tidyverse)
testing %>%
filter(str_detect(testing, "^EGA\\.\\d+"))
# A tibble: 6 x 1
# testing
# <fct>
#1 EGA.0
#2 EGA.1
#3 EGA.2
#4 EGA.3
#5 EGA.4
#6 EGA.5
данные
testing <- structure(list(testing = structure(c(3L, 2L, 9L, 1L, 10L, 4L,
5L, 6L, 7L, 8L), .Label = c("", "blue", "EGA.0", "EGA.1", "EGA.2",
"EGA.3", "EGA.4", "EGA.5", "green", "V-alpha"), class = "factor")),
row.names = c(NA,
-10L), class = c("tbl_df", "tbl", "data.frame"))