re2_split(string, pattern, n = Inf, parallel = FALSE, grain_size = 1e+05, ...)re2_split_fixed(string, pattern, n, parallel = FALSE, grain_size = 1e+05, ...)
re2_split
uses all possible split positions.
For re2_split_fixed
, if n is greater than
the number of pieces, the result will be padded with
empty strings.re2
re2_split_fixed
, a character matrix with n columns.
For re2_split
, a list of character vectors.
Split up a string into pieces. Vectorised over string and pattern.
re2_split("yabba dabba doo", " ")[[1]] [1] "yabba" "dabba" "doo"re2_split_fixed(c("yabba dabba doo", "a bc"), " ", 2)[,1] [,2] [1,] "yabba" "dabba doo" [2,] "a" "bc"