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)、点、空格和连字符的字符串进行预替换。你能建议我在 PHP 中使用正则表达式吗?
preg_replace('/[^-\pL.\s]/u', '', $entity);