Searches a character vector for matches to the built regex pattern.

xp_action_find(pattern, string)

Arguments

pattern

A regexpert object or character string.

string

A character vector to search within.

Value

A character vector of matches.

Examples

my_text <- "The year is 2026."
xp_build_digits() %>% xp_op_repeat(4) %>% xp_action_find(my_text)
#> [1] "2026"