group {qdapRegex} | R Documentation |
Group Regular Expressions
Description
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.
Usage
group(..., left = "(", right = ")", dictionary = getOption("regex.library"))
Arguments
left |
A single length character vector to use as the left bound. |
right |
A single length character vector to use as the right bound. |
dictionary |
A dictionary of canned regular expressions to search within. |
... |
Regular expressions to add grouping parenthesis to a named
expression from the default regular expression dictionary prefixed with
single at ( |
Value
Returns a single string of regular expressions with grouping parenthesis added.
Examples
group(LETTERS)
group(1)
(grouped <- group("(the|them)\\b", "@rm_zip"))
pastex(grouped)
[Package qdapRegex version 0.7.8 Index]