I am working with SQL Server and have come to encounter a situation for which I have no answer. It is as follows:
Given a string diuuuu
, for example, I would like this output diu
. The logic behind it is the last occurrance of each digit (d, i, u) in order. Other examples:
diudi
= udi
dididi
= di
A Regex solution would be greatly appreciated. Thank you!