bind_or(..., group.all = TRUE, left = "\\b", right = left)
TRUE
the resulting `or` concatenated
elements will be wrapped with grouping parenthesis.@
) (e.g., "@rm_hash"
) or a regular expression from
regex_supplement
dictionary prefixed with an at
(@
) (e.g., "@time_12_hours"
).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(LETTERS)[1] "(\\bA\\b|\\bB\\b|\\bC\\b|\\bD\\b|\\bE\\b|\\bF\\b|\\bG\\b|\\bH\\b|\\bI\\b|\\bJ\\b|\\bK\\b|\\bL\\b|\\bM\\b|\\bN\\b|\\bO\\b|\\bP\\b|\\bQ\\b|\\bR\\b|\\bS\\b|\\bT\\b|\\bU\\b|\\bV\\b|\\bW\\b|\\bX\\b|\\bY\\b|\\bZ\\b)"bind_or("them", "those", "that", "these")[1] "(\\bthem\\b|\\bthose\\b|\\bthat\\b|\\bthese\\b)"bind_or("them", "those", "that", "these", group.all = FALSE)[1] "\\bthem\\b|\\bthose\\b|\\bthat\\b|\\bthese\\b"