sats <- c("G 5","G 7","G 9","G10","G13","G16","G19","G20","G27","G28","G30")gsub('([[:alpha:]]+) ', '\\10', sats)
Standard input is empty
[1] "G05" "G07" "G09" "G10" "G13" "G16" "G19" "G20" "G27" "G28" "G30"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!