Match a character vector against a regular expression with at least two parenthetic groupings, returning named vector.
str_pair_match(string, pattern, pos, swap = FALSE, ...)strPairMatch(string, pattern, pos, swap = FALSE, ...)
vector of strings
vector of regular expression which should match exactly two
strings for each element in stringr
. If pos
is specified,
this rule is relaxed.
optional pair of integers with positions of the first and second desired matches, when multiple matches are made by the regular expression
logical scalar, whether to swap the names and values. Default is not to swap, so the first match becomes the name.
strPairMatch
: Deprecated