I basically want to do stripslashes() on text in a string where it is between a {php} and {/php} tag.
A couple of things I've tried so far:
Code: Select all
$tmpl = preg_replace("!\{php\}(.|\s)+\{/php\}!e", "stripslashes('\\1')", $tmpl);
$tmpl = preg_replace( "!\{php\}(ї^{]+)\{/php\}!e", "{php} stripslashes( '$1' ) {/php}", $tmpl );