I've been searching, and I found some similar questions, but none of them are solution for me, so what I need is this in Visual Basic:
I have a text (string) and I have two Arrays like this:
Dim data_array_one As String() = {"One", "Two", "Three", "Four"}
Dim data_array_two As String() = {"Five", "Six", "Seven", "Eight"}
What I need is replace every “One” in a text for “Five”, every “Two” for “Six”, and so... I've been using a simple replace function:
text1 = text1.Replace("One", "Five")
text1 = text1.Replace("Two", "Six")
...
But now array contains 24 elements, and every day it increments automatically, so I need something to do it automatically from arrays instead the actual way... Thanks in advanced.
for (i=0; i< arrayLength;i++) {text1 = text1.Replace(array1[i], array2[i]);}.String.Replaceto replace "Four" with "Eight" will also cause "Fourteen" to become a misspelled "Eightteen". Probably not what you want.