regex_build: Create a regular expression from a character vector or list

View source: R/regex_build.R

regex_buildR Documentation

Create a regular expression from a character vector or list

Description

Create a regular expression from a character vector or list

Usage

regex_build(list, modifier = "single")

Arguments

list

A list of characters

modifier

Type of regex. 'single' will break every word into a separate section of the expression. 'multi' will allow phrases to be components of the expression. Defaults to 'single'.

Value

A regular expression

Examples

regex_build(c("apple", "banana", "carrot"))
regex_build(c("dog treats", "cereal", "Boston baked beans"))

sbw78/sbwtools documentation built on May 20, 2024, 9 a.m.