I am trying to replace strings in a large amount of data and I was hoping to use regular expression for certain updates that I have to make to the text, I should point out that I am fairly new to regular expressions.
Show here is what I am trying to achieve. Within the text I am converting we have the following data {0} {1} {2}, this has to be converted to a new format so {0} becomes %{ param0 } , {1} becomes %{ param1 }, {2} becomes %{ param2 }.
There is no limit on what the number could be, so far it has reached 16 and may go up in the future (It should be pointed out that the number is actually a string at this point). This is code I have so far but it only updates the value to {param0}. Also if the text contains more than one instance it only updates the first.
NewText = Regex.Replace(NewText , @"(?<=\{).*(?=\})", "param$0");
Thanks, Brendy