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 代码。我遇到了这条线,我不知道它应该做什么。有人可以帮我吗?$notice 只是一个常规字符串。
$notice = preg_replace("#([\S]{60})#i", "\\1 ", $notice);
它将在 中找到任何 60 个非空白字符的连续序列$notice,并在其后插入一个空格:
$notice
(..)
\1
[..]
\S
{60}
这段代码相当于:
$notice = preg_replace("#\S{60}#i", "\\0 ", $notice);