Hello, I had used the Invoke Code activity and called a VB.NET method.
The code of this method might look like this:
Dim i As Integer, n As Integer
Dim key As String, str As String
n = arg1.Length - 1
For i = n To 1 Step -1
If (arg1.Chars(i) = arg1.Chars(i - 1)) Then
str = arg1.Chars(i)
key = str + str
Do While (arg1.Contains(key))
arg1 = System.Text.RegularExpressions.Regex.Replace(arg1, key, str)
n = arg1.Length - 1
i = n
Loop
End If
Next i
result = arg1
''System.Windows.Forms.MessageBox.Show("Argument_1 = " + Chr(34) + result + Chr(34))
After setting the arguments, it could be added this code
arg1 is a String input argument and result is the output argument.
After deleting some characters the length of the string changes.
And the search may begin again from the end of the string.
Hope this is also a good method.
With fine regards, Adrian