| 28 |
for requesting some minor changes that give better JavaScript compatibility. |
for requesting some minor changes that give better JavaScript compatibility. |
| 29 |
</P> |
</P> |
| 30 |
<P> |
<P> |
| 31 |
|
Starting with release 8.30, it is possible to compile two separate PCRE |
| 32 |
|
libraries: the original, which supports 8-bit character strings (including |
| 33 |
|
UTF-8 strings), and a second library that supports 16-bit character strings |
| 34 |
|
(including UTF-16 strings). The build process allows either one or both to be |
| 35 |
|
built. The majority of the work to make this possible was done by Zoltan |
| 36 |
|
Herczeg. |
| 37 |
|
</P> |
| 38 |
|
<P> |
| 39 |
|
The two libraries contain identical sets of functions, except that the names in |
| 40 |
|
the 16-bit library start with <b>pcre16_</b> instead of <b>pcre_</b>. To avoid |
| 41 |
|
over-complication and reduce the documentation maintenance load, most of the |
| 42 |
|
documentation describes the 8-bit library, with the differences for the 16-bit |
| 43 |
|
library described separately in the |
| 44 |
|
<a href="pcre16.html"><b>pcre16</b></a> |
| 45 |
|
page. References to functions or structures of the form <i>pcre[16]_xxx</i> |
| 46 |
|
should be read as meaning "<i>pcre_xxx</i> when using the 8-bit library and |
| 47 |
|
<i>pcre16_xxx</i> when using the 16-bit library". |
| 48 |
|
</P> |
| 49 |
|
<P> |
| 50 |
The current implementation of PCRE corresponds approximately with Perl 5.12, |
The current implementation of PCRE corresponds approximately with Perl 5.12, |
| 51 |
including support for UTF-8 encoded strings and Unicode general category |
including support for UTF-8/16 encoded strings and Unicode general category |
| 52 |
properties. However, UTF-8 and Unicode support has to be explicitly enabled; it |
properties. However, UTF-8/16 and Unicode support has to be explicitly enabled; |
| 53 |
is not the default. The Unicode tables correspond to Unicode release 6.0.0. |
it is not the default. The Unicode tables correspond to Unicode release 6.0.0. |
| 54 |
</P> |
</P> |
| 55 |
<P> |
<P> |
| 56 |
In addition to the Perl-compatible matching function, PCRE contains an |
In addition to the Perl-compatible matching function, PCRE contains an |
| 63 |
<P> |
<P> |
| 64 |
PCRE is written in C and released as a C library. A number of people have |
PCRE is written in C and released as a C library. A number of people have |
| 65 |
written wrappers and interfaces of various kinds. In particular, Google Inc. |
written wrappers and interfaces of various kinds. In particular, Google Inc. |
| 66 |
have provided a comprehensive C++ wrapper. This is now included as part of the |
have provided a comprehensive C++ wrapper for the 8-bit library. This is now |
| 67 |
PCRE distribution. The |
included as part of the PCRE distribution. The |
| 68 |
<a href="pcrecpp.html"><b>pcrecpp</b></a> |
<a href="pcrecpp.html"><b>pcrecpp</b></a> |
| 69 |
page has details of this interface. Other people's contributions can be found |
page has details of this interface. Other people's contributions can be found |
| 70 |
in the <i>Contrib</i> directory at the primary FTP site, which is: |
in the <i>Contrib</i> directory at the primary FTP site, which is: |
| 92 |
distribution. |
distribution. |
| 93 |
</P> |
</P> |
| 94 |
<P> |
<P> |
| 95 |
The library contains a number of undocumented internal functions and data |
The libraries contains a number of undocumented internal functions and data |
| 96 |
tables that are used by more than one of the exported external functions, but |
tables that are used by more than one of the exported external functions, but |
| 97 |
which are not intended for use by external callers. Their names all begin with |
which are not intended for use by external callers. Their names all begin with |
| 98 |
"_pcre_", which hopefully will not provoke any name clashes. In some |
"_pcre_" or "_pcre16_", which hopefully will not provoke any name clashes. In |
| 99 |
environments, it is possible to control which external symbols are exported |
some environments, it is possible to control which external symbols are |
| 100 |
when a shared library is built, and in these cases the undocumented symbols are |
exported when a shared library is built, and in these cases the undocumented |
| 101 |
not exported. |
symbols are not exported. |
| 102 |
</P> |
</P> |
| 103 |
<br><a name="SEC2" href="#TOC1">USER DOCUMENTATION</a><br> |
<br><a name="SEC2" href="#TOC1">USER DOCUMENTATION</a><br> |
| 104 |
<P> |
<P> |
| 109 |
of searching. The sections are as follows: |
of searching. The sections are as follows: |
| 110 |
<pre> |
<pre> |
| 111 |
pcre this document |
pcre this document |
| 112 |
|
pcre16 details of the 16-bit library |
| 113 |
pcre-config show PCRE installation configuration information |
pcre-config show PCRE installation configuration information |
| 114 |
pcreapi details of PCRE's native C API |
pcreapi details of PCRE's native C API |
| 115 |
pcrebuild options for building PCRE |
pcrebuild options for building PCRE |
| 116 |
pcrecallout details of the callout feature |
pcrecallout details of the callout feature |
| 117 |
pcrecompat discussion of Perl compatibility |
pcrecompat discussion of Perl compatibility |
| 118 |
pcrecpp details of the C++ wrapper |
pcrecpp details of the C++ wrapper for the 8-bit library |
| 119 |
pcredemo a demonstration C program that uses PCRE |
pcredemo a demonstration C program that uses PCRE |
| 120 |
pcregrep description of the <b>pcregrep</b> command |
pcregrep description of the <b>pcregrep</b> command (8-bit only) |
| 121 |
pcrejit discussion of the just-in-time optimization support |
pcrejit discussion of the just-in-time optimization support |
| 122 |
pcrelimits details of size and other limits |
pcrelimits details of size and other limits |
| 123 |
pcrematching discussion of the two matching algorithms |
pcrematching discussion of the two matching algorithms |
| 124 |
pcrepartial details of the partial matching facility |
pcrepartial details of the partial matching facility |
| 125 |
pcrepattern syntax and semantics of supported regular expressions |
pcrepattern syntax and semantics of supported regular expressions |
| 126 |
pcreperform discussion of performance issues |
pcreperform discussion of performance issues |
| 127 |
pcreposix the POSIX-compatible C API |
pcreposix the POSIX-compatible C API for the 8-bit library |
| 128 |
pcreprecompile details of saving and re-using precompiled patterns |
pcreprecompile details of saving and re-using precompiled patterns |
| 129 |
pcresample discussion of the pcredemo program |
pcresample discussion of the pcredemo program |
| 130 |
pcrestack discussion of stack usage |
pcrestack discussion of stack usage |
| 131 |
pcresyntax quick syntax reference |
pcresyntax quick syntax reference |
| 132 |
pcretest description of the <b>pcretest</b> testing command |
pcretest description of the <b>pcretest</b> testing command |
| 133 |
pcreunicode discussion of Unicode and UTF-8 support |
pcreunicode discussion of Unicode and UTF-8/16 support |
| 134 |
</pre> |
</pre> |
| 135 |
In addition, in the "man" and HTML formats, there is a short page for each |
In addition, in the "man" and HTML formats, there is a short page for each |
| 136 |
C library function, listing its arguments and results. |
8-bit C library function, listing its arguments and results. |
| 137 |
</P> |
</P> |
| 138 |
<br><a name="SEC3" href="#TOC1">AUTHOR</a><br> |
<br><a name="SEC3" href="#TOC1">AUTHOR</a><br> |
| 139 |
<P> |
<P> |
| 151 |
</P> |
</P> |
| 152 |
<br><a name="SEC4" href="#TOC1">REVISION</a><br> |
<br><a name="SEC4" href="#TOC1">REVISION</a><br> |
| 153 |
<P> |
<P> |
| 154 |
Last updated: 24 August 2011 |
Last updated: 10 January 2012 |
| 155 |
<br> |
<br> |
| 156 |
Copyright © 1997-2011 University of Cambridge. |
Copyright © 1997-2012 University of Cambridge. |
| 157 |
<br> |
<br> |
| 158 |
<p> |
<p> |
| 159 |
Return to the <a href="index.html">PCRE index page</a>. |
Return to the <a href="index.html">PCRE index page</a>. |