title: Regexes Strip all link except link containing xxx word
body: <p>I want to remove all  tag link from my site, except link containing xxx word in it.</p>
  
  <p>Example:</p>
  
  <pre><code>&lt;a class="happy" href="https://example.com/good-day/" rel="nofollo"&gt;happy day&lt;/a&gt;
  </code></pre>
  
  <p>if the above code found, let it be replace with just text <strong>happy day</strong></p>
  
  <p>now if the below code if found and the link contain <strong>xxx</strong> in it, let it just leave it the way it is.</p>
  
  <pre><code>&lt;a class="happy" href="https://example.com/good-day-xxx-now/" rel="nofollo"&gt;happy day&lt;/a&gt;
  </code></pre>
  
  <p>so far the link contain <strong>xxx</strong> in it let it NOT be replace just just text.</p>
  
  <p>I have tried the below regexes but it replaces all the content to just text</p>
  
  <pre><code>&lt;/?a(|\s+[^&gt;]+)&gt;
  </code></pre>
  
  <p>I TRIED TO USE THIS <code>&lt;/?a(|\s+[^&gt;]+^(?!.*xxx).*$)&gt;</code> but i still could not achieve what i was looking for.</p>