Counting preg_match in smarty
<p>How to count preg_match matches in smarty? Why is the following not working?</p>

<pre><code>{preg_match("/\[PGN.*](.*)\[\/PGN.*\]/", $code, $match)}

{$match|@count}
</code></pre>