str[stri_detect(str, ...)]
.stri_subset(str, ..., regex, fixed, coll, charclass)stri_subset_fixed(str, pattern)
stri_subset_charclass(str, pattern)
stri_subset_coll(str, pattern, opts_collator = NULL)
stri_subset_regex(str, pattern, opts_regex = NULL)
stri_subset
onlystri_opts_collator
; NULL
for default settings;
stri_subset_coll
onlystri_opts_regex
; NULL
for default settings;
stri_subset_regex
onlystr
and pattern
.stri_subset
is a convenience function.
It calls either stri_subset_regex
,
stri_subset_fixed
, stri_subset_coll
,
or stri_subset_charclass
,
depending on the argument used.
Unless you are a very lazy person, please call the underlying functions
directly for better performance.
stringi-search
stri_subset_fixed(c("stringi R", "REXAMINE", "123"), c('i', 'R', '0'))
stri_subset_fixed(c("stringi R", "REXAMINE", "123"), 'R')
stri_subset_charclass(c("stRRRingi","REXAMINE","123"),
c("\\p{Ll}", "\\p{Lu}", "\\p{Zs}"))
Run the code above in your browser using DataLab