
A wrapper for bind
and pastex
that wraps each sub-expression
element with left/right boundaries (\b
by default) and then
concatenate/joins bound strings with a regex `or` ("|"). Equivalent to
pastex(bind(...), sep = "|")
.
bind_or(..., group.all = TRUE, left = "\b", right = left)
logical. If TRUE
the resulting `or` concatenated
elements will be wrapped with grouping parenthesis.
A single length character vector to use as the left bound.
A single length character vector to use as the right bound.
Regular expressions to paste together or a named expression
from the default regular expression dictionary prefixed with single at
(@
) (e.g., "@rm_hash"
) or a regular expression from
regex_supplement
dictionary prefixed with an at
(@
) (e.g., "@time_12_hours"
).
bind_or(LETTERS)
bind_or("them", "those", "that", "these")
bind_or("them", "those", "that", "these", group.all = FALSE)
Run the code above in your browser using DataLab