标签: regex preg-replace preg-replace-callback
返回preg_replace(' / [\ xC0- \ xF7] [\ x80- \ xBF] / e',' mb2entity(" \ 0")&#39 ;,$ str);
答案 0 :(得分:0)
return preg_replace_callback('/[\xC0-\xF7][\x80-\xBF]/', function($n1) { return mb2entity($n1); }, $str);