I am able to get the preg_replace function to find and replace only the inner braced delimiter. eg: the script below replaces { FIELD: date }
with "12/12/2015"
but leaves the outer braces.
I tried escaping the outer braces to no avail. Help please!
$myFileToCopy = file_get_contents("http://localhost/templatemaker/masterTemplates/".$object['fileName'].$object['fileExtension']);
$myFileToCopy = preg_replace("{{ FIELD: date }}", "12/12/2015", $myFileToCopy);