powered by
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.
strsplit
ore_split(regex, text, start = 1L, simplify = TRUE)
A character vector or list of substrings.
A single character string or object of class "ore". In the former case, this will first be passed through ore.
"ore"
ore
A vector of strings to match against.
An optional vector of offsets (in characters) at which to start searching. Will be recycled to the length of text.
text
If TRUE, a character vector containing the pieces will be returned if text is of length 1. Otherwise, a list of such objects will always be returned.
TRUE
ore_search
ore_split("-?\\d+", "I have 2 dogs, 3 cats and 4 hamsters")
Run the code above in your browser using DataLab