countries <- c("Senegal1345769", "Canada&", "Austria12", "Spain-", "Russia#$")sub("[^[:alpha:]]+$", "", countries)
Standard input is empty
[1] "Senegal" "Canada" "Austria" "Spain" "Russia"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!