group(..., left = "(", right = ")", dictionary = getOption("regex.library"))
@
) (e.g., "@rm_hash"
) or a regular expression from
regex_supplement
dictionary prefixed with an at
(@
) (e.g., "@time_12_hours"
).group
- A wrapper for paste(collapse="|")
that also searches
the default and supplemental (regex_supplement
)
dictionaries for regular expressions before pasting them together with a pipe
(|
) separator.
group(LETTERS)[1] "(A)" "(B)" "(C)" "(D)" "(E)" "(F)" "(G)" "(H)" "(I)" "(J)" "(K)" "(L)" "(M)" "(N)" "(O)" "(P)" "(Q)" "(R)" "(S)" "(T)" "(U)" [22] "(V)" "(W)" "(X)" "(Y)" "(Z)"group(1)[1] "(1)"(grouped <- group("(the|them)\\b", "@rm_zip"))[1] "((the|them)\\b)" "((?<!\\d)\\d{5}(?:[ -]\\d{4})?\\b)"pastex(grouped)[1] "((the|them)\\b)|((?<!\\d)\\d{5}(?:[ -]\\d{4})?\\b)"