regex-helpers {roxytypes}R Documentation

A half-baked extract method

Description

A half-baked extract method

Usage

re_extract(pattern, replace, x)

extract_backticked(x)

extract_quoted(x)

is_backticked(x)

is_bracketed(x)

Arguments

pattern

character string containing a regular expression (or character string for fixed = TRUE) to be matched in the given character vector. Coerced by as.character to a character string if possible. If a character vector of length 2 or more is supplied, the first element is used with a warning. Missing values are allowed except for regexpr, gregexpr and regexec.

Value

(character[1]) The substituted string if a replacement is made, or NULL otherwise.

Functions

Note

This implementation is considered half-baked because there's no check for whether a replacement is made that results in the same string. This case will be interpreted the same as if there was no match.


[Package roxytypes version 0.1.1 Index]