I have a requirement where I need to replace multiple characters with specific replacement characters in a string.
Example: Replace '#25' with 'String 1', Replace '#35 with 'String xyz' and and so on. The mapping will be stored in a SharePoint list. the characters can occur any number of times in a single string, so, I need to identify them, get the correct mapping/replacement character from the SP list and replace it.
Example of a string: "quick#25brown#35fox" ==>Should become 'quickString 1brownString xyz' after replacement.
What would be the efficient way to do the replacements in the String? I tried a quite a bit and could not find a solution yet. Any help would be greatly appreciated.