PCRE - Perl Compatible Regular Expressions

The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5. PCRE has its own native API, as well as a set of wrapper functions that correspond to the POSIX regular expression API. The PCRE library is free, even for building proprietary software.

PCRE was originally written for the Exim MTA, but is now used by many high-profile open source projects, including Apache, PHP, KDE, Postfix, Analog, and Nmap. PCRE has also found its way into some well known commercial products, like Apple Safari. Some other interesting projects using PCRE include Chicken, Ferite, Onyx, Hypermail, Leafnode, Askemos, Wenlin, and 8th.


There are two major versions of the PCRE library. The newest version, PCRE2, was released in 2015 and is at version 10.20.

The original, very widely deployed PCRE library, originally released in 1997, is at version 8.37, and the API and feature set are stable—future releases will be for bugfixes only. All new future features will be to PCRE2, not the original PCRE 8.x series.


You can download the current releases of the PCRE and PCRE2 libraries from their official home via anonymous FTP:

You can also download via HTTPS from the mirror at SourceForge:

You can check out the PCRE2 source code via Subversion (or browse PCRE2 source code on-line):

svn co svn://vcs.exim.org/pcre2/code/trunk pcre

Or, to check out the older PCRE source code can via Subversion (or browse older PCRE source code on-line):

svn co svn://vcs.exim.org/pcre/code/trunk pcre

Contributed Ports

A precompiled Windows port of PCRE, which may be a few versions behind, is available courtesy the GnuWin32 project.

If you just need the command-line PCRE or PCRE2 tools on Windows, more up to date precompiled binary versions are available here:

A PCRE port for z/OS, a mainframe operating system which uses EBCDIC as its default character encoding, can be found here:


You can read PCRE2 HTML documentation, or the text version of the PCRE2 man pages. For Perl 5 regular expression syntax, read the Perl regular expressions man page.

The distribution itself also contains a README and the BSD LICENCE. If you are upgrading, read the NEWS and ChangeLog files.

You can also browse the older PCRE HTML documentation, text version of the older PCRE man pages, and the original README or and the original ChangeLog files.

Details on PCRE, and, in particular, comparisons to Perl's regular expression semantics, can also be found in the community authored Wikipedia entry on PCRE.

You can find a curated summary of changes with each PCRE release, copies of documentation from older releases, and other useful information from the third party authored RexEgg PCRE Documentation and Change Log page.


To report a problem with the PCRE library, or to make a feature request, please file a bug in the PCRE bug repository. You may want to browse currently open PCRE bugs first. Please don't use the SourceForge bug tracking system, as it is not normally monitored.

There is a mailing list for active PCRE developers at pcre-dev@exim.org, and you can browse the mailing list archives on-line.

The PCRE library was written by Philip Hazel:

E-mail local part: ph10
E-mail domain: cam.ac.uk

Please note that neither this website nor the SourceForge download repositories are maintained by Philip. Please report website or SourceForge PCRE project problems to webmaster@pcre.org.

Last modified - webmaster@pcre.org