title: Regex: Named groups and replacements
body: <p>There is a method</p>
  
  <pre><code>Regex.Replace(string source, string pattern, string replacement)
  </code></pre>
  
  <p>The last parameter supports pattern replacements such as <code>${groupName}</code> and others (but I don't know the group name in the run-time).</p>
  
  <p>In my case I have the dynamically created pattern like:</p>
  
  <pre><code>(?&lt;c0&gt;word1)|(?&lt;c1&gt;word2)|(?&lt;c2&gt;word3)
  </code></pre>
  
  <p>My purpose is to replace each group with the value depending on group name. For example, the word "word1" will be replaced with <code>&lt;span class="c0"&gt;word1&lt;/span&gt;</code>. This is for search results highlighting like google.</p>
  
  <p>Is it possible to do this using the method above not using overloaded method with <code>MatchEvaluator</code> parameter?</p>
  
  <p>Thanks in advance!</p>