ore_split {ore} | R Documentation |
Split strings using a regex
Description
This function breaks up the strings provided at regions matching a regular
expression, removing those regions from the result. It is analogous to the
strsplit
function in base R.
Usage
ore_split(regex, text, start = 1L, simplify = TRUE)
Arguments
regex |
A single character string or object of class |
text |
A vector of strings to match against. |
start |
An optional vector of offsets (in characters) at which to start
searching. Will be recycled to the length of |
simplify |
If |
Value
A character vector or list of substrings.
See Also
Examples
ore_split("-?\\d+", "I have 2 dogs, 3 cats and 4 hamsters")
[Package ore version 1.7.4.1 Index]