Get 2 last letters of a string and increased

Hello,
how can i make the string “admin_X10-11_001” increased by 1 in order
to take “admin_x10-11_002”??

Thank you
K.

“admin_X10-11_001”.succ

Depending on how far you want to take it:

a = “admin_x10-11_001”
a.succ! # a = a.succ
a #=> “admin_x10-11_001”

Note:

“aby9”.succ # => “abz0”