Captures regex groups and returns a named matrix of groups with one column
per capture group and one row per element in 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()
.