php 正则获取字符串中的汉字,去除字符串中除汉字外的所有字符
preg_match_all('/[\x{4e00}-\x{9fff}]+/u', $list[$i]['iparr'], $matches); $list[$i]['iparr'] = join('', $matches[0]);
- 上一篇 »php正则,删除字符串中的中英文标点符号
- 下一篇 »java去除字符串中的特定字符
preg_match_all('/[\x{4e00}-\x{9fff}]+/u', $list[$i]['iparr'], $matches); $list[$i]['iparr'] = join('', $matches[0]);