Description Usage Arguments Value Examples
Transforms a vector of patterns given in the unglue format to a vector of proper regex (PCRE) patterns (so they can for instance be used with functions from other packages).
1 2 3 4 5 6 7 8 | unglue_regex(
patterns,
open = "{",
close = "}",
use_multiple = FALSE,
named_capture = FALSE,
attributes = FALSE
)
|
patterns |
a character vector or a list of character vectors, if a list,
items will be pasted using an empty separator ( |
open |
The opening delimiter. |
close |
The closing delimiter. |
use_multiple |
whether we should consider that duplicate labels can match different substrings. |
named_capture |
whether to incorporate the names of the groups in the output regex |
attributes |
whether to give group attributes to the output |
a character vector.
1 2 | patterns <- c("{number=\\d+} is [{what}]", "{word=\\D+} is [{what}]")
unglue_regex(patterns)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.