using System.Text.RegularExpressions;
public static void Main()
string[] reloc = new string[10];
string text = "I test you and I eat you";
Console.WriteLine(reloc.Length);
for (int idx = 0; idx < reloc.Length; idx++)
if (reloc[idx] != null && reloc[idx + 1] != null) {
text = Regex.Replace(text, reloc[idx], reloc[idx + 1]);
Console.WriteLine("Output: " + text);