matchAll: Function matchAll

matchAllR Documentation

Function matchAll

Description

Search for matches to argument pattern within each element of a character vector. Returns corresponding substrings (compare stringr::str_match_all).

Usage

matchAll(string = NA, pattern = ".*", value = T, ...)

Arguments

string

Character vector where matches are sought.

pattern

Character string containing a regular expression (or character string for fixed = TRUE) to be matched in the given character vector.

value

Logical value. If T (default) returns substrings. Otherwise returns positions.

Examples

matchAll(string=c("Hello world","Hello"),pattern="wo.*")

AndreasFischer1985/quantqual documentation built on June 20, 2022, 4:55 p.m.