s <- "Ładie, to jakaś ściema!!"res <- regmatches(s, gregexpr("(*UCP)[\\w']+|[.,;:?!]", s, perl=TRUE))res
Standard input is empty
[[1]] [1] "Ładie" "," "to" "jakaś" "ściema" "!" "!"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!