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.
preg_replace ("/(\p{P})/", ' ', $str)アポストロフィを削除しますが、そうすべきではありません。助けてください
preg_replace ("/(\p{P})/", ' ', $str)
これを試して:
/\p{P}(?<!')/
追加の後読みアサーションは、句読点文字がアポストロフィでないことを確認するためのものです。