This helper checks whether all elements of a character vector match a regex pattern.
contains_pattern(
x,
pattern,
ignore.case = FALSE,
perl = FALSE,
fixed = FALSE,
useBytes = FALSE
)TRUE if all strings in x match pattern, otherwise FALSE or a string error message.
A character vector to check
A regular expression pattern (string)
Logical flags passed to grepl()