codes <- c('x0fa319-432f39-4fre78', '23weq0-4fsf198-417203', 'x2431-5435-1242-qewf')sub("^x\\d", "", codes, ignore.case=TRUE)
Standard input is empty
[1] "fa319-432f39-4fre78" "23weq0-4fsf198-417203" "431-5435-1242-qewf"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!