title: Looping through a regex replace
body: <p>So I have this string[]:</p>
  
  <pre><code>string[] middleXMLTags = {"&lt;/Table1&gt;&lt;Table2&gt;", "&lt;/Table2&gt;&lt;Table3&gt;"};
  </code></pre>
  
  <p>And I want to do something like this with it:</p>
  
  <pre><code>int i = 0;
  foreach (regex where it finds the replacement string)
  {
      response = Regex.Replace(response, "&lt;/Table&gt;&lt;Table&gt;", middleXMLTags[i]);
      i++;
  }
  response = Regex.Replace(response, "&lt;Table&gt;", &lt;Table1&gt;);
  response = Regex.Replace(response, "&lt;/Table&gt;", &lt;/Table3&gt;);
  </code></pre>
  
  <p>Ultimately, I'm just asking if it's possible to somehow loop through a <code>Regex</code>, and therefore being able to replace the <code>string</code> with different values that are stored in a <code>string[]</code>. It doesn't have to be a <code>foreach</code> loop, and I know that this code is ridiculous, but I put it hear to ask the clearest possible question. Please comment any questions you have for me. </p>
  
  <p>Thanks for all help =)</p>