-1

WH-LKO

WH-CHE

WH-BLR

WH-BLR

WH-HYD

W1- GGN

WH12-GGN

WH3-GUW

F2-AMD

1 Answers1

0

You can try substring with nchar to extract last 3 characters from a string.

substring(x, nchar(x)-2)
#[1] "LKO" "CHE"

Data:

x <- c("WH-LKO", "WH-CHE")
GKi
  • 37,245
  • 2
  • 26
  • 48