Remove anchor tags around text in content
<p>I want to remove anchor tags around the text of content but need to keep if it is with specific URL's :</p>

<pre><code>this is example text &lt;a href="www.1.com"&gt;hello&lt;/a&gt; and
this is second link &lt;a href="www.2.com"&gt;hello word two&lt;/a&gt;
this is third link &lt;a href="www.3.com"&gt;hello word three&lt;/a&gt;
this is fourth link &lt;a href="www.4.com"&gt;hello word four&lt;/a&gt;
</code></pre>

<p>I only want to remove anchors with href's from www.1.com and www.2.com and want to keep other.
Currently I am using following code which is removing all the anchor tags :</p>

<pre><code>preg_replace( '/&lt;a[^&gt;]+&gt;([^&lt;]+)&lt;\/a&gt;/i','\1', $content )
</code></pre>

<p>Please help.</p>