C# regular expressions .Replace
<p>I have difficulties in C# using regular expressions. What I need to do is to find a specific string, and keep only a specific word in that string.</p>

<p>Here is my code :</p>

<pre><code> reg = new Regex("&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;Span class=\"abc\"&gt;&lt;Span style=\"color:#......;\"&gt;&lt;B&gt;(.*?)&lt;/td&gt;&lt;/tr&gt;");
</code></pre>

<p>Here is the unique string I want to retrieve, since there can be different colors I put ...... (code color is always 6 characters), and the (.*?) is the specific word that I will want to save.</p>

<p>Then it goes like this :</p>

<pre><code>this.varToSave = reg.Match(data).Value.Replace("&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;Span class=\"abc\"&gt;&lt;Span style=\"color:#......;\"&gt;&lt;B&gt;", "").Replace("&lt;/td&gt;&lt;/tr&gt;", "");
</code></pre>

<p>I want to erase everything and keep only my word (.*?), but it doesn't work. It only erases the ("", ""). I think it is a problem with the "......" in the replace code, but I don't know how to fix this.</p>

<p>Thanks in advance.</p>
