col <- c("WBU-ARGU*06:03:04","WBU-ARDU*08:01:01","WBU-ARFU*11:03:05","WBU-ARFU*03:456")sub("(\\d:\\d+):\\d+$", "\\1", col)
Standard input is empty
[1] "WBU-ARGU*06:03" "WBU-ARDU*08:01" "WBU-ARFU*11:03" "WBU-ARFU*03:456"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!