I've got the following that matches anything within curly braces automatically and it works great.
preg_match_all('/\{(.*?)\}/i', $this->tplfile, $matches );
I'm building a template system and I'm giving the option to have the system automatically parse text placeholders without you having to specify it like the knocked up example below.
example;
$sys->assign_vars(array(
'hello_user' =>$lang['hello_user'],
'the_time' => $lang['cuurent_time_is']
));
There are specific entries however, that are prefix with a single character and a following underscore.
{u_username}{s_site_title}
I'm been working on it for over an hour trying to accomplish it only matching within curly braces that are not prefixed with a single character and underscore.
My results are either
a) nothing is displayed
b) displays everything
c) removes the first letter from each word.
Can someone amend my code to get the desired affect please.
Thanks in advanced.