I've got a terrible problem. There are a lot of constructions like {{SOME_WORDS}} in my string and I want to change it for $lang['some_word']. For this reason I use something like:
$cache=preg_replace('/({{)+([A-Z_])+(}})/u','$2',$cache);
and got only last char of SOME_WORDS "S". The next problem is to put $lang[strtolower($2)] into preg_replace second argument. Or there could be another solution?