Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions reference/pcre/pattern.syntax.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,10 @@
also by name. There are two alternative syntaxes
<literal>(?&lt;name&gt;pattern)</literal> and <literal>(?'name'pattern)</literal>.
</para>
<simpara>
As of PHP 8.4.0, which bundles PCRE2 10.44, the maximum length of a
subpattern name is 128 characters; prior to PHP 8.4.0 it was 32 characters.
</simpara>

<para>
Sometimes it is necessary to have multiple matching, but alternating
Expand Down Expand Up @@ -1915,6 +1919,14 @@
at the ends of strings; an example is given at the end
of the section on once-only subpatterns.
</para>
<simpara>
The fixed-length restriction described above applies prior to PHP 8.4.0.
As of PHP 8.4.0, which bundles PCRE2 10.44, a lookbehind assertion may match
strings of variable length: alternatives of differing lengths (such as
<literal>(?&lt;!dogs?|cats?)</literal>) and top-level branches that can match
more than one length (such as <literal>(?&lt;=ab(c|de))</literal>) are now
permitted, up to an implementation-defined maximum length.
</simpara>
<para>
Several assertions (of any sort) may occur in succession.
For example,
Expand Down