PhP Find (and replace) string between two different strings
<p>I have a string, that look like this <code>"&lt;html&gt;"</code>. Now what I want to do, is get all text between the <code>"&lt;"</code> and the <code>"&gt;"</code>, and this should apply to any text, so that if i did <code>"&lt;hello&gt;"</code>, or <code>"&lt;p&gt;"</code> that would also work. Then I want to replace this string with a string that contains the string between the tags.
For example<br>
In:</p>

<pre><code>&lt;[STRING]&gt;
</code></pre>

<p>Out:</p>

<pre><code>&lt;this is [STRING]&gt;
</code></pre>

<p>Where [STRING] is the string between the tags.</p>