This was not obvious to me nor apparently anyone else trying to use preg_match in Smarty so I thought I’d share the solution. Given $href=’home.php?cat=1′ and trying to get 1 out of it:
{if "/cat=(\d+)/"|preg_match:$href:$match} {$href = "My-Page-`$match.1`.html"} {/if}