Ok, I'm currently working on a template engine for my website. What I'm having trouble with is replacing {$var} with $var. I have something like this in my code:
if (preg_match_all("#\{\$(.*?)\}#", $tpl, $matches))
{
// Do stuff...
}
The problem is that it doesn't match anything. At first I thought it was a problem with the template, but I found out it's not because I can locate and replace other stuff in the template like {if} statements and such. Is there a problem with the RegExp? Cna someone help?