regex_capture: Capture regex groups

View source: R/utils.R

regex_captureR Documentation

Capture regex groups

Description

Captures regex groups and returns a named matrix of groups with one column per capture group and one row per element in x.

Usage

regex_capture(pattern, x, ...)

Arguments

pattern

(character[1]) A regex pattern to use for capturing groups.

x

(character) A vector of strings to match against.

...

Additional arguments passed to regexpr().


roxytypes documentation built on Oct. 16, 2024, 1:06 a.m.