fork download
  1. library(stringr)
  2. x <- "abc[[+de.f[-[[g"
  3. str_extract_all(x, "[a-z.]+|\\[+|[+-]")
  4.  
Success #stdin #stdout 0.22s 190528KB
stdin
Standard input is empty
stdout
[[1]]
[1] "abc"  "[["   "+"    "de.f" "["    "-"    "[["   "g"