Remove element by the text inside : <p>how can I remove an element using jquery by the text in the element.</p>

<pre><code>&lt;a href="/"&gt;Link1&lt;/a&gt;
</code></pre>

<p>I dont want to remove the element by class or ID. I want to do something like this:</p>

<pre><code>$('a').html('Link1').remove()
</code></pre>

<p>Can you help me with this?</p>
