names_or_error: names or error

names_or_errorR Documentation

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

pattern

Value

Character vector.

Author(s)

Toby Dylan Hocking


tdhock/namedCapture documentation built on Jan. 27, 2024, 9:02 p.m.