I'm having an issue with this regex:
$template_contents = preg_replace("/\[(\w+)\]/","\${1}",$template_contents);
what I want this to do is the following:
Pass it a string like
Hello [Person] I [Greet] You
and have it spit out
Hello Bob I bid hello to You
where $Person = Bob and $Greet = bid hello to
Right not all that it is doing is stripping the [ and ] from the text.