x <- c("C 10.1 C 12.4","C 12", "C 45.5 C 10")unlist(strsplit(x, "(?<=\\d)\\s+(?=C)", perl=TRUE))
Standard input is empty
[1] "C 10.1" "C 12.4" "C 12" "C 45.5" "C 10"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!