View source: R/strExtractAll.R
| strExtractAll | R Documentation |
Uses gregexpr() and regmatches() internally.
strExtractAll(x, pattern, fixed = FALSE)
x |
|
pattern |
|
fixed |
|
list.
List of character vector extractions.
Returns character(0L) for match failure, NA_character_ for NA.
Updated 2023-09-25.
gregexpr() , regmatches().
stringi::stri_extract_all().
stringr::str_extract_all().
https://stringr.tidyverse.org/articles/from-base.html
object <- strExtractAll(
x = c("apples x4", "bag of flour", "bag of sugar", "milk x2", NA),
pattern = "[a-z]+"
)
print(object)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.