What you have there is a "smart key" - one attribute comprising three elements. Smart keys are dumb, because they're a pain in tha neck to work with.
So the correct solution will be to split that attribute into three separate attributes and make it a composite key instead.
In the meantime you could use reguklar expressions to fin dthe highest value of the middle component...
select max(regexp_replace(dumb_key
, '([A-Z][0-9]{2})\.([0-9]{4})\..([0-9]{3})'
, '\2'))
from your_table
/
No doubt there are all sorts of other complexities you haven't explained, which means this probably isn't the compleat solution. But it should be a starter for ten.