any_grepl: Does the pattern appear anywhere?

View source: R/any_grepl.R

any_greplR Documentation

Does the pattern appear anywhere?

Description

Shortcut for any(grepl(...)), mostly for consistency.

Usage

any_grepl(
  x,
  pattern,
  perl = TRUE,
  ignore.case = FALSE,
  fixed = FALSE,
  quiet = FALSE
)

Arguments

x

A character vector.

pattern, perl, ignore.case, fixed

As in grep.

quiet

(logical, default: FALSE) If TRUE, silences any messages.

Details

From version v 1.4.0, any_grepl(a, bb) will be internally reversed to any_grepl(bb, a) if length(bb) > 1 and length(a) == 1.

Examples

any_grepl(c("A_D_E", "K0j"), "[a-z]")


hutils documentation built on April 13, 2022, 5:23 p.m.