stringi (version 0.2-5)

stri_extract: Extract Pattern Matches

Description

A convenience function. Calls either stri_extract_all, stri_extract_first, or stri_extract_last, depending on the argument used. Note that this is slower than the direct call.

Usage

stri_extract(str, ..., regex, coll, charclass, mode = c("first", "all",
  "last"))

Arguments

str
character vector of strings to search in
...
additional arguments passed to the underlying functions
regex
character vector; regular expressions
coll
character vector; canonically equivalent patterns
charclass
character vector; identifiers of character classes
mode
single string; whether to look for all, or only the first/last occurrence of the pattern

Value

  • The return value is the same as the underlying functions called, i.e. a character vector or a list of character vectors.

Details

Unless you are very lazy, please call the underlying functions directly for better performance.

See Also

Other search_extract: stri_extract_all_charclass, stri_extract_first_charclass, stri_extract_first_charclass, stri_extract_last_charclass, stri_extract_last_charclass; stri_extract_all_coll, stri_extract_first_coll, stri_extract_first_coll, stri_extract_last_coll, stri_extract_last_coll; stri_extract_all_regex, stri_extract_first_regex, stri_extract_first_regex, stri_extract_last_regex, stri_extract_last_regex; stri_extract_all; stri_extract_first; stri_extract_last; stri_extract_words; stringi-search