Probably over analysing this a little bit but how would stackoverflow suggest is the best way to return an integer that is contained at the end of a string.
Thus far
Obligatory LINQ one-liner
var input = "ABCD1234"; var result = string.Concat(input.ToArray().Reverse().TakeWhile(char.IsNumber).Reverse());