regex_match: Return matching characters matching an expression.

Description Usage Arguments Value

View source: R/haircut.R

Description

Given a vector of chracter strings, this function returns matches as a vector. This allows a chainable regex filtering style that is readily compatible with ' Capuring groups in '()' will be ignored. Best to use non-capturing '(?:)'.

Usage

1

Arguments

text

a vector of charcter strings to be matched.

pattern

a regular expression.

Value

vector of substrings of 'text' that matched the 'pattern'.


MilesMcBain/haircut documentation built on May 21, 2019, 2:31 a.m.