regex_or: Utility function to assemble a regex of alternative patterns

View source: R/parse_dttm_fmt.R

regex_orR Documentation

Utility function to assemble a regex of alternative patterns

Description

regex_or() takes a set of patterns and binds them with the Or ("|") pattern for an easy regex of alternative patterns.

Usage

regex_or(x, .open = FALSE, .close = FALSE)

Arguments

x

A character vector of alternative patterns.

.open

Whether the resulting regex should start with "|".

.close

Whether the resulting regex should end with "|".

Value

A character scalar of the resulting regex.


sdtm.oak documentation built on April 3, 2025, 9:37 p.m.