Preg_replace: How to strip the hyperlinks, but only if the hyperlink contains particular text
<p>I want to strip away hyperlinks, so only the text remains.  So that</p>

<pre><code>&lt;a href='www.mysite.com/directory/'&gt;Click Here For My Site&lt;/a&gt;
</code></pre>

<p>Simply becomes</p>

<pre><code>Click Here For My Site
</code></pre>

<p>I have this so far and it works:</p>

<pre><code>$content = preg_replace('#&lt;a.*&gt;(.*)&lt;/a&gt;#isU', "$1",  $content);
</code></pre>

<p>HOWEVER, I only want to strip the hyperlink away IF the hyperlink contains the specific test 'directory' in it.</p>

<p>In that case, the link below, which does not contain the word 'directory', would NOT be stripped of it's hyperlink.</p>

<pre><code>&lt;a href='www.mysite.com/FORUM/'&gt;Click Here For My Site&lt;/a&gt;
</code></pre>

<p>I cannot figure out how to do this!  Whatever I try doesn't seem to work... :(</p>
