stringi (version 0.2-5)

stri_extract_all: Extract All Pattern Matches

Description

A convenience function. Calls either stri_extract_all_regex, stri_extract_all_coll, or stri_extract_all_charclass, depending on the argument used.

Usage

stri_extract_all(str, ..., regex, coll, charclass)

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

Value

  • Returns 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_first; stri_extract_last; stri_extract_words; stri_extract; stringi-search

Examples

Run this code
if (stri_install_check(silent=TRUE))
stri_extract_all('XaaaaX', regex=c('\\p{Ll}', '\\p{Ll}+', '\\p{Ll}{2,3}', '\\p{Ll}{2,3}?'))

if (stri_install_check(silent=TRUE))
stri_extract_all('Bartolini', coll='i')

if (stri_install_check(silent=TRUE))
stri_extract_all('stringi is so good!', charclass='\\p{Zs}') # all whitespaces

Run the code above in your browser using DataCamp Workspace