$str = 'hello World!@#$%^&*()你好012345'; print_r(preg_replace("/[^a-zA-Z0-9\x{4e00}-\x{9fa5}]+/u", ' ', $str).PHP_EOL); print_r(preg_replace("/[^a-zA-Z0-9\x{4e00}-\x{9fa5}]/u", ' ', $str).PHP_EOL);
京公网安备 11010502049817号