I need to replace all the words of the template, but these words enclosed in {} and []. Please help
$content = '<div class="header header">{header} {header2} [header][/header]</div>';
$content = preg_replace("/(\s|\"|\')(^$)header(^$)(\s|\"|\')/is",'new_class',$content);
OUTPUT should be the following: <div class="new_class new_class">{header} {header2} [header][/header]</div>