Returns the positions of substrings that match the regular expression.
1 2 3
Character string, i.e. of length 1.
Matching pattern as character string.
Logical: whether case should be ignored;
Logical: whether the first are all occurrences should be found; default: all.
Logical: should the string be splitted at the occurrences of the pattern?; default: no.
Returns the start and end positions and the exact value of substrings
that match the regular expression. If
split is choosen, the
splitted strings will also be returned.
A list with components
end as numeric vectors
indicating the start and end positions of the matches.
match contains each exact match, and
split contains the
character vector of splitted strings.
If no match is found all components will be
split that will contain the whole string if
split = TRUE.
This is the behavior of the corresponding Matlab function, though the
signature, options and return values do not match exactly.
Notice the transposed parameters
pat compared to the
corresponding R function
1 2 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.