View Single Post
Old 09-01-2015, 06:37 PM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,053
I don't deal with preg_replace that often but after spending a couple of minutes looking at preg_replace_callbak I am thinking that something like this will work:

$value = preg_replace_callback('/<%(.*)%>/sU', function(){ return @constant("\\1"); }, $value);

Worst that can happen is it won't ;p

edited in: also remove the e modifier I think. I forgot to do that originally.

.
__________________
All cookies cleared!
sarettah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote