Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこの解決策を見つけました
$content=preg_replace('/[^\pL\p{Zs}]+/u', '', $string);
utf-8 文字以外はすべて削除されますが、utf-8 文字と数字以外は必要ですか?
範囲内に数字(\ d)を追加してみてください
$content=preg_replace('/[^\d\pL\p{Zs}]+/u', '', $string);