This helper checks whether all elements of a character vector match a regex pattern.
Usage
contains_pattern(
x,
pattern,
ignore.case = FALSE,
perl = FALSE,
fixed = FALSE,
useBytes = FALSE
)Arguments
- x
A character vector to check
- pattern
A regular expression pattern (string)
- ignore.case, perl, fixed, useBytes
Logical flags passed to
grepl()
