21,886
社区成员
发帖
与我相关
我的任务
分享
preg_replace('/\&\#x([0-9a-fA-F]+)\;/me', "codeHex2utf('\\1',{$lo})",$str);
preg_replace_callback('/\&\#x([0-9a-fA-F]+)\;/m',
function($m) use ($lo) { return codeHex2utf($m[1], $lo); },
$str);
preg_replace('/\&\#x([0-9a-fA-F]+)\;/me', function($1){return codeHex2utf('$1,{$lo})"},$str);
preg
preg_replace('/\&\#x([0-9a-fA-F]+)\;/me', function($1){return codeHex2utf('$1,{$lo})",$str);
大致是这么个写法吧。自己去看看手册吧