Description Usage Arguments Details Value See Also
These functions extract substrings of str
that match
a given pattern
, and also give matches for capture
groups, i.e. subpatterns given in round parentheses.
1 2 3 4 5 | stri_match_all_regex(str, pattern, opts_regex = list())
stri_match_first_regex(str, pattern, opts_regex = list())
stri_match_last_regex(str, pattern, opts_regex = list())
|
str |
character vector of strings to search in |
pattern |
character vector of regular expressions to search for |
opts_regex |
a named list as generated with
|
Vectorized over str
and pattern
.
For stri_match_all_regex
, a list of character
matrices is returned. Otherwise, a character matrix is
given. NA
if not found or if given capture group is
unavailable.
The first column gives the whole match. The second one corresponds to the first capture group, the third – the second capture group, and so on.
Other search_match: stri_match_all
;
stri_match_first
;
stri_match_last
; stri_match
;
stringi-search
Other search_regex: stri_count_regex
;
stri_detect_regex
;
stri_extract_all_regex
,
stri_extract_all_regex
,
stri_extract_first_regex
,
stri_extract_first_regex
,
stri_extract_last_regex
,
stri_extract_last_regex
;
stri_locate_all_regex
,
stri_locate_all_regex
,
stri_locate_first_regex
,
stri_locate_first_regex
,
stri_locate_last_regex
,
stri_locate_last_regex
;
stri_opts_regex
;
stri_replace_all_regex
,
stri_replace_all_regex
,
stri_replace_first_regex
,
stri_replace_first_regex
,
stri_replace_last_regex
,
stri_replace_last_regex
;
stri_split_regex
,
stri_split_regex
;
stringi-search-regex
;
stringi-search
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.