multiMatch: Multiple match

View source: R/multiMatch.R

multiMatchR Documentation

Multiple match

Description

Seek all elements matching a given pattern in a character strings.

Usage

multiMatch(text, pattern)

Arguments

text

a character vector where matches are sought, or an object which can be coerced by as.character to a character vector, see regexec.

pattern

character string containing a regular expression to be matched in the given character vector, see regexec.

Details

multiMatch is essentially a wrapper around base::regexec() and base::regmatches() to find more than one match.

Value

A vector of character strings matching pattern argument.

Examples

multiMatch(loremIpsum(), " [[:alnum:]]{3} ")

inSileco/letiRmisc documentation built on Sept. 16, 2022, 2:19 p.m.