grep2 is a wraper around the traditional grep, that works with native pipe, returns value and are ignore case as default

grep2(x, arg1, ic = T, value = TRUE, ...)

Arguments

x

data to search

arg1

pattern

ic

ignore case

...

arguments passed to grep. See ?grep for more details

Examples

c("a", "b", "c", "d") |> grep2("a")
#> [1] "a"