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.
英数字(utf-8)、ドット、スペース、ハイフンのみを含む文字列に対してpreg置換を実行しています。PHPでそれを行うための正規表現を提案していただけますか?
preg_replace('/[^-\pL.\s]/u', '', $entity);