Is there a maximum number of A’s that would ever occur in the string? I’m thinking if there will never be more than let’s say 10 A’s, we could substitute AAAAAAAAAA(10) with B, then again AAAAAAAAA(9) with B, all the way down to 1.
Yes and instead of having to create 30 separate assign or replace activities you could use a do while with a counter which also specifies the number of characters (which match the counter variable). It would just need to count down from 30. You could just replace left(string, countervariable) with B.
@fernandoborges, use a string method. For exemple, a variable text of type string. Then you have to use the assign activity: text = text.Replace(“A”,“B”).
You can also use a regex option and Matches activity. According to your purpose, the solution of using a string is quicker and simpler.