<?php
//提取字符串中的汉字其余信息剔除
$str=‘f龙,真 。,.,。?!:;·…~&@#,.?!:;、……~&@#“”‘’〝 "〞'′'><﹞﹝><》《】【)(()[]???〔?〕〈〉』『〗〖}{」「][}{︵︷︹︽︿﹁﹃??/|\\|/?︼﹄﹂︾﹀︺︸︶__﹏﹍``?|^-¨ˊˇ?ˋ︴﹊﹉﹋ ̄ˉ1234456789‘;
preg_match_all(‘/[\x{4e00}-\x{9fff}]+/u‘, $str, $matches);//只要汉字
preg_match_all(‘/[a-zA-Z0-9\x{4e00}-\x{9fff}]+/u‘, $str, $matches_1);//只保留汉字和数字和英文字符
$str = join(‘‘, $matches[0]);
$str_1 = join(‘‘, $matches_1[0]);
echo $str;
echo $str_1;
?>