Description Usage Arguments Value
Detect and return all matching patterns from character vector.
Detect and return first matching pattern from character vector.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | chr_extract(x, pat, ignore.case = FALSE, collapse = NULL,
invert = FALSE, na = TRUE, ...)
chr_extract_first(x, pat, ignore.case = FALSE, invert = FALSE,
na = TRUE, ...)
chr_extract_links(x, collapse = NULL)
chr_extract_words(x, collapse = NULL)
chr_extract_mentions(x, collapse = NULL)
chr_extract_hashtags(x, collapse = NULL)
chr_extract_phone(x, collapse = NULL)
|
x |
Character vector |
pat |
Pattern (regex) to extract from text. |
ignore.case |
Logical indicating whether to ignore capitalization. Defaults to false. |
collapse |
Text inserted between extracted matches. If non-null (the default) a vector of matches is returned for each inputted string. |
invert |
Logical indicating whether to extract matching portion (default) or, if this value is true, non-matching portions of text. |
na |
Logical indicating whether to return NA values for input elements without matches. Defaults to true. |
... |
Other named arguments passed to |
Vector of matches extracted from input text.
Character vector of matches extracted from input text.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.