X <- "I'm not that good at regex yet, but am getting better!"strsplit(X, "[[:space:]]|(?=(?![',])[[:punct:]])", perl=TRUE)
Standard input is empty
[[1]] [1] "I'm" "not" "that" "good" "at" "regex" "yet," [8] "but" "am" "getting" "better" "!"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!