Learn R Programming

namedCapture (version 2020.4.1)

names_or_error: names or error

Description

Extract capture group names. Stop with an error if there are no capture groups, or if there are any capture groups without names.

Usage

names_or_error(vec.with.attrs, 
    pattern)

Arguments

vec.with.attrs

Output from g?regexpr.

pattern

Value

Character vector.