x <- "This is it, isn't it (well, yes), and (well, this, that, and this, too)"strsplit(x, "\\([^()]*\\)(*SKIP)(*F)|\\h*,\\h*", perl=T)
Standard input is empty
[[1]] [1] "This is it" [2] "isn't it (well, yes)" [3] "and (well, this, that, and this, too)"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!