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.
我想使用 PHP 的 preg_replace 在字符串中搜索任何大于 100 个字符且没有空格的子字符串,并将其替换为任何内容。我将如何做到这一点?
/\s*\S{101}\S*\s*/
这也会删除已删除部分周围的空白。