s <- "hello/JJ world/NN"sapply(s, function(x){gsub("([a-zA-Z])/[a-zA-Z]+", "\\1", x)})
Standard input is empty
hello/JJ world/NN "hello world"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!