6 |
.sp |
.sp |
7 |
The PCRE library is a set of functions that implement regular expression |
The PCRE library is a set of functions that implement regular expression |
8 |
pattern matching using the same syntax and semantics as Perl, with just a few |
pattern matching using the same syntax and semantics as Perl, with just a few |
9 |
differences. The current implementation of PCRE (release 6.x) corresponds |
differences. (Certain features that appeared in Python and PCRE before they |
10 |
approximately with Perl 5.8, including support for UTF-8 encoded strings and |
appeared in Perl are also available using the Python syntax.) |
|
Unicode general category properties. However, this support has to be explicitly |
|
|
enabled; it is not the default. |
|
11 |
.P |
.P |
12 |
In addition to the Perl-compatible matching function, PCRE also contains an |
The current implementation of PCRE (release 7.x) corresponds approximately with |
13 |
|
Perl 5.10, including support for UTF-8 encoded strings and Unicode general |
14 |
|
category properties. However, UTF-8 and Unicode support has to be explicitly |
15 |
|
enabled; it is not the default. The Unicode tables correspond to Unicode |
16 |
|
release 5.0.0. |
17 |
|
.P |
18 |
|
In addition to the Perl-compatible matching function, PCRE contains an |
19 |
alternative matching function that matches the same compiled patterns in a |
alternative matching function that matches the same compiled patterns in a |
20 |
different way. In certain circumstances, the alternative function has some |
different way. In certain circumstances, the alternative function has some |
21 |
advantages. For a discussion of the two matching algorithms, see the |
advantages. For a discussion of the two matching algorithms, see the |
118 |
\fBpcrebuild\fP |
\fBpcrebuild\fP |
119 |
.\" |
.\" |
120 |
documentation for details). In these cases the limit is substantially larger. |
documentation for details). In these cases the limit is substantially larger. |
121 |
However, the speed of execution will be slower. |
However, the speed of execution is slower. |
122 |
.P |
.P |
123 |
All values in repeating quantifiers must be less than 65536. The maximum |
All values in repeating quantifiers must be less than 65536. The maximum |
124 |
compiled length of subpattern with an explicit repeat count is 30000 bytes. The |
compiled length of subpattern with an explicit repeat count is 30000 bytes. The |
125 |
maximum number of capturing subpatterns is 65535. |
maximum number of capturing subpatterns is 65535. |
126 |
.P |
.P |
127 |
There is no limit to the number of non-capturing subpatterns, but the maximum |
There is no limit to the number of parenthesized subpatterns, but there can be |
128 |
depth of nesting of all kinds of parenthesized subpattern, including capturing |
no more than 65535 capturing subpatterns. |
|
subpatterns, assertions, and other types of subpattern, is 200. |
|
129 |
.P |
.P |
130 |
The maximum length of name for a named subpattern is 32, and the maximum number |
The maximum length of name for a named subpattern is 32 characters, and the |
131 |
of named subpatterns is 10000. |
maximum number of named subpatterns is 10000. |
132 |
.P |
.P |
133 |
The maximum length of a subject string is the largest positive number that an |
The maximum length of a subject string is the largest positive number that an |
134 |
integer variable can hold. However, when using the traditional matching |
integer variable can hold. However, when using the traditional matching |
163 |
.P |
.P |
164 |
If you compile PCRE with UTF-8 support, but do not use it at run time, the |
If you compile PCRE with UTF-8 support, but do not use it at run time, the |
165 |
library will be a bit bigger, but the additional run time overhead is limited |
library will be a bit bigger, but the additional run time overhead is limited |
166 |
to testing the PCRE_UTF8 flag in several places, so should not be very large. |
to testing the PCRE_UTF8 flag occasionally, so should not be very big. |
167 |
.P |
.P |
168 |
If PCRE is built with Unicode character property support (which implies UTF-8 |
If PCRE is built with Unicode character property support (which implies UTF-8 |
169 |
support), the escape sequences \ep{..}, \eP{..}, and \eX are supported. |
support), the escape sequences \ep{..}, \eP{..}, and \eX are supported. |
235 |
.br |
.br |
236 |
University Computing Service, |
University Computing Service, |
237 |
.br |
.br |
238 |
Cambridge CB2 3QG, England. |
Cambridge CB2 3QH, England. |
239 |
.P |
.P |
240 |
Putting an actual email address here seems to have been a spam magnet, so I've |
Putting an actual email address here seems to have been a spam magnet, so I've |
241 |
taken it away. If you want to email me, use my initial and surname, separated |
taken it away. If you want to email me, use my initial and surname, separated |
242 |
by a dot, at the domain ucs.cam.ac.uk. |
by a dot, at the domain ucs.cam.ac.uk. |
243 |
.sp |
.sp |
244 |
.in 0 |
.in 0 |
245 |
Last updated: 05 June 2006 |
Last updated: 23 November 2006 |
246 |
.br |
.br |
247 |
Copyright (c) 1997-2006 University of Cambridge. |
Copyright (c) 1997-2006 University of Cambridge. |