xref: /aosp_15_r20/external/pcre/index.md (revision 22dc650d8ae982c6770746019a6f94af92b0f024)
1*22dc650dSSadaf Ebrahimi# PCRE2 - Perl-Compatible Regular Expressions
2*22dc650dSSadaf Ebrahimi
3*22dc650dSSadaf EbrahimiThe PCRE2 library is a set of C functions that implement regular expression
4*22dc650dSSadaf Ebrahimipattern matching using the same syntax and semantics as Perl 5. PCRE2 has its
5*22dc650dSSadaf Ebrahimiown native API, as well as a set of wrapper functions that correspond to the
6*22dc650dSSadaf EbrahimiPOSIX regular expression API. The PCRE2 library is free, even for building
7*22dc650dSSadaf Ebrahimiproprietary software. It comes in three forms, for processing 8-bit, 16-bit,
8*22dc650dSSadaf Ebrahimior 32-bit code units, in either literal or UTF encoding.
9*22dc650dSSadaf Ebrahimi
10*22dc650dSSadaf EbrahimiPCRE2 was first released in 2015 to replace the API in the original PCRE
11*22dc650dSSadaf Ebrahimilibrary, which is now obsolete and no longer maintained. As well as a more
12*22dc650dSSadaf Ebrahimiflexible API, the code of PCRE2 has been much improved since the fork.
13*22dc650dSSadaf Ebrahimi
14*22dc650dSSadaf Ebrahimi## Download
15*22dc650dSSadaf Ebrahimi
16*22dc650dSSadaf EbrahimiAs well as downloading from the
17*22dc650dSSadaf Ebrahimi[GitHub site](https://github.com/PCRE2Project/pcre2), you can download PCRE2
18*22dc650dSSadaf Ebrahimior the older, unmaintained PCRE1 library from an
19*22dc650dSSadaf Ebrahimi[*unofficial* mirror](https://sourceforge.net/projects/pcre/files/) at SourceForge.
20*22dc650dSSadaf Ebrahimi
21*22dc650dSSadaf EbrahimiYou can check out the PCRE2 source code via Git or Subversion:
22*22dc650dSSadaf Ebrahimi
23*22dc650dSSadaf Ebrahimi    git clone https://github.com/PCRE2Project/pcre2.git
24*22dc650dSSadaf Ebrahimi    svn co    https://github.com/PCRE2Project/pcre2.git
25*22dc650dSSadaf Ebrahimi
26*22dc650dSSadaf Ebrahimi## Contributed Ports
27*22dc650dSSadaf Ebrahimi
28*22dc650dSSadaf EbrahimiIf you just need the command-line PCRE2 tools on Windows, precompiled binary
29*22dc650dSSadaf Ebrahimiversions are available at this
30*22dc650dSSadaf Ebrahimi[Rexegg page](http://www.rexegg.com/pcregrep-pcretest.html).
31*22dc650dSSadaf Ebrahimi
32*22dc650dSSadaf EbrahimiA PCRE2 port for z/OS, a mainframe operating system which uses EBCDIC as its
33*22dc650dSSadaf Ebrahimidefault character encoding, can be found at
34*22dc650dSSadaf Ebrahimi[http://www.cbttape.org](http://www.cbttape.org/) (File 939).
35*22dc650dSSadaf Ebrahimi
36*22dc650dSSadaf Ebrahimi## Documentation
37*22dc650dSSadaf Ebrahimi
38*22dc650dSSadaf EbrahimiYou can read the PCRE2 documentation
39*22dc650dSSadaf Ebrahimi[here](https://PCRE2Project.github.io/pcre2/doc/html/index.html).
40*22dc650dSSadaf Ebrahimi
41*22dc650dSSadaf EbrahimiComparisons to Perl's regular expression semantics can be found in the
42*22dc650dSSadaf Ebrahimicommunity authored Wikipedia entry for PCRE.
43*22dc650dSSadaf Ebrahimi
44*22dc650dSSadaf EbrahimiThere is a curated summary of changes for each PCRE release, copies of
45*22dc650dSSadaf Ebrahimidocumentation from older releases, and other useful information from the third
46*22dc650dSSadaf Ebrahimiparty authored
47*22dc650dSSadaf Ebrahimi[RexEgg PCRE Documentation and Change Log page](http://www.rexegg.com/pcre-documentation.html).
48*22dc650dSSadaf Ebrahimi
49*22dc650dSSadaf Ebrahimi## Contact
50*22dc650dSSadaf Ebrahimi
51*22dc650dSSadaf EbrahimiTo report a problem with the PCRE2 library, or to make a feature request, please
52*22dc650dSSadaf Ebrahimiuse the PCRE2 GitHub issues tracker. There is a mailing list for discussion of
53*22dc650dSSadaf Ebrahimi PCRE2 issues and development at [email protected], which is where any
54*22dc650dSSadaf Ebrahimiannouncements will be made. You can browse the
55*22dc650dSSadaf Ebrahimi[list archives](https://groups.google.com/g/pcre2-dev).
56*22dc650dSSadaf Ebrahimi
57