Replace current match with its own text in jQuery
<p>I'm using jQuery to replace matched hyperlinks with their link text. That is:</p>

<pre><code>&lt;a href="http://stackoverflow.com"&gt;Stack Overflow&lt;/a&gt;
</code></pre>

<p>becomes</p>

<p><code>
Stack Overflow
</code></p>

<p>I'm trying:</p>

<pre><code>$("table.ms-listviewtable a:nth-child(4)").replaceWith($(this).text())
</code></pre>

<p>but get a JavaScript error.</p>

<p>Any ideas why and how to fix it?</p>
