Skip to content
Prev 316477 / 398506 Next

substring from behind

It's possible the direct way in R:

customer <- c("Mercedes_02352", "Audi_03555")
substr(customer, nchar(customer) - 3, nchar(customer) - 1)

Isidro