I'm trying to develop a basic template engine, so I have to use preg_replace so much. I've a problem about below subject:
$subject = "{%content%} %content%";
$pattern = '/matched_regex/';
$replace = 'OK';
echo preg_replace($pattern,$replace,$subject);
and the output must be like this:
{%content%} OK
in other words it will be just matched with %content%
What should I do regex pattern?