Usage
strMultiMatch(pattern, text, dropEmpty = FALSE, ...)strPairMatch(pattern, text, swap = FALSE, dropEmpty = FALSE, ...)
Arguments
pattern
regular expression: if it has bracketed sections, these
submatches are returned
text
is the string to match against. This vector should be the same
length as the pattern vector, or the patern vector should be length one.
...
are additional parameters passed to regexec and regmatches. I
haven't tried this: it may need two separate variables containing lists of
params, since this will send everything to both functions.
dropEmpty
logical whether to drop rows with no matches
swap
logical scalar, whether to swap the names and values. Default is
not to swap, so the first match becomes the name.