fork download
  1. x <- "A(B)C"
  2. library(stringr)
  3. str_extract_all(x, "\\([^()]*\\)|[^()]+")
Success #stdin #stdout 0.27s 42188KB
stdin
Standard input is empty
stdout
[[1]]
[1] "A"   "(B)" "C"