V2 <- c("6K102","62D102","627Z102")sub("([[:upper:]])", ".\\1", V2)
Standard input is empty
[1] "6.K102" "62.D102" "627.Z102"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!