How to hide text between multiple <> // [] **
<p>I use this code and all is ok, it hide text from <code>$comments</code> contains between <code>[]</code>, but i want to hide text from other symbols for. ex. <code>** &amp;&amp; ^^ $$ ## // &lt;&gt;</code>. What i need to add here, to have INSTEAD OF </p>

<pre><code>Date &lt;20.02.2013&gt; Time [11-00] Name #John#
</code></pre>

<p>Have this:</p>

<pre><code>Date Time Name 
</code></pre>

<p>?</p>

<pre><code>function replaceTags($startPoint, $endPoint, $newText, $source) {
    return preg_replace('#('.preg_quote($startPoint).')(.*)('.preg_quote($endPoint).')#si', '$1'.$newText.'$3', $source);
}

$source= $comments;
$startPoint='[';
$endPoint=']';
$newText='';
echo replaceTags($startPoint, $endPoint, $newText, $source);
</code></pre>
