Given an input string (such as D4C3B2A1) I want to sort the alphabet characters, and the numbers (ascending) then alternate them. Expected output would be: A1B2C3D4
The way I thought about doing this was using RegEx to pull out two strings, letters only, then numbers only.
Sorting both strings, then using substring to pull out each letter one by one and assigning it a new string. However, this seems like it would only work given you know orignal strings value/length etc.
Plus I figured there was a better way to do this to begin with.
Assume this needs to work for inputted string, not just the provided example string.