| 7 |
There are some size limitations in PCRE but it is hoped that they will never in |
There are some size limitations in PCRE but it is hoped that they will never in |
| 8 |
practice be relevant. |
practice be relevant. |
| 9 |
.P |
.P |
| 10 |
The maximum length of a compiled pattern is 65539 (sic) bytes if PCRE is |
The maximum length of a compiled pattern is approximately 64K data units (bytes |
| 11 |
compiled with the default internal linkage size of 2. If you want to process |
for the 8-bit library, 16-bit units for the 16-bit library) if PCRE is compiled |
| 12 |
|
with the default internal linkage size of 2 bytes. If you want to process |
| 13 |
regular expressions that are truly enormous, you can compile PCRE with an |
regular expressions that are truly enormous, you can compile PCRE with an |
| 14 |
internal linkage size of 3 or 4 (see the \fBREADME\fP file in the source |
internal linkage size of 3 or 4 (when building the 16-bit library, 3 is rounded |
| 15 |
distribution and the |
up to 4). See the \fBREADME\fP file in the source distribution and the |
| 16 |
.\" HREF |
.\" HREF |
| 17 |
\fBpcrebuild\fP |
\fBpcrebuild\fP |
| 18 |
.\" |
.\" |
| 19 |
documentation for details). In these cases the limit is substantially larger. |
documentation for details. In these cases the limit is substantially larger. |
| 20 |
However, the speed of execution is slower. |
However, the speed of execution is slower. |
| 21 |
.P |
.P |
| 22 |
All values in repeating quantifiers must be less than 65536. |
All values in repeating quantifiers must be less than 65536. |
| 24 |
There is no limit to the number of parenthesized subpatterns, but there can be |
There is no limit to the number of parenthesized subpatterns, but there can be |
| 25 |
no more than 65535 capturing subpatterns. |
no more than 65535 capturing subpatterns. |
| 26 |
.P |
.P |
| 27 |
|
There is a limit to the number of forward references to subsequent subpatterns |
| 28 |
|
of around 200,000. Repeated forward references with fixed upper limits, for |
| 29 |
|
example, (?2){0,100} when subpattern number 2 is to the right, are included in |
| 30 |
|
the count. There is no limit to the number of backward references. |
| 31 |
|
.P |
| 32 |
The maximum length of name for a named subpattern is 32 characters, and the |
The maximum length of name for a named subpattern is 32 characters, and the |
| 33 |
maximum number of named subpatterns is 10000. |
maximum number of named subpatterns is 10000. |
| 34 |
.P |
.P |
| 58 |
.rs |
.rs |
| 59 |
.sp |
.sp |
| 60 |
.nf |
.nf |
| 61 |
Last updated: 24 August 2011 |
Last updated: 08 January 2012 |
| 62 |
Copyright (c) 1997-2011 University of Cambridge. |
Copyright (c) 1997-2012 University of Cambridge. |
| 63 |
.fi |
.fi |