p_grep: Searches for regular expressions

View source: R/p_grep.r

p_grepR Documentation

Searches for regular expressions

Description

A wrapper function for grep(), with the x argument listed first to support native piping.

Usage

p_grep(x, ...)

Arguments

x

the character string

...

additional arguments passed to grep().

Value

the positions of the matches

Examples

c('dog','elephant','cat','horse','hippopotamus') |> p_grep('^h',value=TRUE)

baseverse documentation built on Oct. 27, 2026, 1:07 a.m.