php - Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback in Echelon B3 -


    function removecolorcode($text) {       return preg_replace('/\\^([0-9])/ie', '', $text);     } 

the above code gives deprecation warning on echelon b3 think after upgrading php 5.5.29 our host provider


how can replace code preg_replace_callback()?

in specific case, remove /e nothing here.
can remove /i code becomes:

function removecolorcode($text) {   return preg_replace('/\^[0-9]/', '', $text); } 

Comments