gpt4 book ai didi

php - 哪些字符与 PHP 的 PCRE 中的完全匹配?

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:38:42 27 4
gpt4 key购买 nike

manual page对此保持沉默,尽管用户在其下方发表了评论,其中指出 ASCII 代码为 0x090x0A0x0C 的字符, 0x0D0x20,即 TAB、LF、FF、CR 和 SPACE,被识别为“空白”,但没有给出来源。

如果 PCRE 与 Perl 兼容,显然,这可能不像 this Perl documentation 中解释的那么简单。 .事实上,它可能受语言环境的影响,然后开始变得毛茸茸。

上下文是我正在尝试替换用于检查纯空格字符串的 preg_match 调用。

最佳答案

根据PHP docs :

The space characters are HT (9), LF (10), VT (11), FF (12), CR (13), and space (32). Notice that this list includes the VT character (code 11). This makes "space" different to \s, which does not include VT (for Perl compatibility).

关于php - 哪些字符与 PHP 的 PCRE 中的完全匹配?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20050997/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com