哪里可以找到完整的regex引用?

时间:2022-12-26 16:09:25

I came across some regular expressions that I've never seen before, and I can't find any information on what they do. Here's an example:

我遇到了一些我以前从未见过的正则表达式,我找不到它们的任何信息。这里有一个例子:

/[\p{Z}\p{Cc}\p{Cf}\p{Cs}\p{Pi}\p{Pf}]/u

I'm looking for a full reference for regex.

我在寻找regex的完整参考资料。

P.S. I think the example provided only words in certain languages. It works in PHP but not Javascript.

附注:我认为这个例子只提供了某些语言的词汇。它使用PHP而不是Javascript。

2 个解决方案

#1


3  

The complete reference for PHP PCRE (Perl Compatible Regular Expression) is in the PHP docs.

PHP PCRE (Perl兼容正则表达式)的完整引用在PHP文档中。

What you're looking at are Unicode character properties, also in the PHP docs, as well as the regular expression modifiers for the u at the end of the regex.

您所看到的是Unicode字符属性(也在PHP文档中),以及regex末尾u的正则表达式修饰符。

#2


0  

Mastering Regular Expression 3rd is your best choice

掌握正则表达式是你最好的选择

#1


3  

The complete reference for PHP PCRE (Perl Compatible Regular Expression) is in the PHP docs.

PHP PCRE (Perl兼容正则表达式)的完整引用在PHP文档中。

What you're looking at are Unicode character properties, also in the PHP docs, as well as the regular expression modifiers for the u at the end of the regex.

您所看到的是Unicode字符属性(也在PHP文档中),以及regex末尾u的正则表达式修饰符。

#2


0  

Mastering Regular Expression 3rd is your best choice

掌握正则表达式是你最好的选择