PCRE2 development is now based here.
Go to file
Carlo Marcelo Arenas Belón 4279abbd7d
pcre2test: allow using readline headers for libedit (#99)
At least in OpenBSD, there is a libedit library in base, but without
public headers.  Public headers for readline are available but since
15db5d36 (pcre2test: avoid using readline headers with libedit,
2022-04-07) won't be picked up automatically.

Allow pointing cmake to those headers by doing (for example):

  $ cmake -DEDITLINE_INCLUDE_DIR=/usr/include/readline

Or using custom CPPFLAGS with configure (for example):

  $ CPPFLAGS=-I/usr/include/readline ./configure --enable-pcre2test-libedit

Since the headers from readline.h would be otherwise incomplete, detect
that case and pull the extra headers that are required automagically and
while at it, cleanup the NCURSES dependency that was unnecessarily copied
from readline.
2022-04-14 16:51:51 +01:00
cmake pcre2test: allow using readline headers for libedit (#99) 2022-04-14 16:51:51 +01:00
doc Fix typo `with-match-limit_depth` -> `with-match-limit-depth` (#83) 2022-01-26 12:15:11 +00:00
m4 Change --enable-pcre8 etc to --enable-pcre2-8 etc and consequent changes; 2014-10-17 15:52:57 +00:00
maint pcre2test: allow using readline headers for libedit (#99) 2022-04-14 16:51:51 +01:00
src pcre2test: allow using readline headers for libedit (#99) 2022-04-14 16:51:51 +01:00
testdata Fix incorrect compiling when [Aa] etc. are quantified 2022-01-26 08:37:18 +00:00
.gitignore Ignore Python cache 2021-12-24 16:20:26 +00:00
132html Add additional compile options and PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES. 2017-05-17 17:55:11 +00:00
AUTHORS Prepare for 10.38-RC1 release 2021-08-31 17:10:37 +01:00
CMakeLists.txt pcre2test: allow using readline headers for libedit (#99) 2022-04-14 16:51:51 +01:00
COPYING Fix erroneous COPYING file. 2016-01-05 15:49:53 +00:00
ChangeLog Update ChangeLog for #96 2022-04-08 17:12:40 +01:00
CheckMan Fix documentation typos and upgrade documentation checking script. 2020-04-24 16:05:36 +00:00
CleanTxt Documentation scripts 2014-09-23 11:35:51 +00:00
Detrail Documentation scripts 2014-09-23 11:35:51 +00:00
HACKING Add support for Bidi_Control and Bidi_Class properties 2021-12-08 15:34:27 +00:00
LICENCE Prepare for 10.38-RC1 release 2021-08-31 17:10:37 +01:00
Makefile.am Arrange to distribute pcre2_ucptables.c 2021-12-23 16:13:45 +00:00
NEWS Update docs and version info for 10.39. 2021-10-29 17:03:31 +01:00
NON-AUTOTOOLS-BUILD Update docs and version info for 10.39. 2021-10-29 17:03:31 +01:00
PrepareRelease Renamed dftables as pcre2_dftables and enable it to write the tables in binary. 2020-03-20 18:09:59 +00:00
README Update README to mention autogen.sh 2022-04-13 09:21:38 +01:00
README.md Update README.md to be identical to index.md. 2021-08-28 10:19:40 +01:00
RunGrepTest RunGrepTest: Fix tests 132 and 133 when srcdir is relative (#71) 2022-01-04 16:59:03 +00:00
RunGrepTest.bat Add --disable-pcre2grep-callout-fork configuration setting. 2018-11-17 16:45:57 +00:00
RunTest Auto generate unicode property tests. (#67) 2021-12-31 16:47:37 +00:00
RunTest.bat Fix bug in RunTest: not reporting failure in test 2, and fix bugs in RunTest 2020-11-22 15:16:05 +00:00
autogen.sh Add basic configuration files. 2014-02-20 19:17:05 +00:00
config-cmake.h.in inttypes and stdint cleanup (#30) 2021-10-29 15:05:19 +01:00
configure.ac pcre2test: allow using readline headers for libedit (#99) 2022-04-14 16:51:51 +01:00
index.md Another tweak needed. 2021-08-28 10:16:41 +01:00
libpcre2-8.pc.in Fix Windows debug builds (Bugzilla #2600) using CMake. 2020-06-22 15:51:19 +00:00
libpcre2-16.pc.in Fix Windows debug builds (Bugzilla #2600) using CMake. 2020-06-22 15:51:19 +00:00
libpcre2-32.pc.in Fix Windows debug builds (Bugzilla #2600) using CMake. 2020-06-22 15:51:19 +00:00
libpcre2-posix.pc.in Fix Windows debug builds (Bugzilla #2600) using CMake. 2020-06-22 15:51:19 +00:00
pcre2-config.in Fix Windows debug builds (Bugzilla #2600) using CMake. 2020-06-22 15:51:19 +00:00
pcre2_fuzzer.dict Commit an experimental fuzzer dictionary. 2017-05-20 15:34:50 +00:00
pcre2_fuzzer.options Create options file for fuzzer. 2017-05-24 09:10:29 +00:00
perltest.sh Fix delimiters in tests 1 and 4 for correct Perl behaviour (Bugzilla #2641). 2020-09-13 15:56:32 +00:00

README.md

PCRE2 - Perl-Compatible Regular Expressions

The PCRE2 library is a set of C functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5. PCRE2 has its own native API, as well as a set of wrapper functions that correspond to the POSIX regular expression API. The PCRE2 library is free, even for building proprietary software. It comes in three forms, for processing 8-bit, 16-bit, or 32-bit code units, in either literal or UTF encoding.

PCRE2 was first released in 2015 to replace the API in the original PCRE library, which is now obsolete and no longer maintained. As well as a more flexible API, the code of PCRE2 has been much improved since the fork.

Download

As well as downloading from the GitHub site, you can download PCRE2 or the older, unmaintained PCRE1 library from an unofficial mirror at SourceForge.

You can check out the PCRE2 source code via Git or Subversion:

git clone https://github.com/PhilipHazel/pcre2.git
svn co    https://github.com/PhilipHazel/pcre2.git

Contributed Ports

If you just need the command-line PCRE2 tools on Windows, precompiled binary versions are available at this Rexegg page.

A PCRE2 port for z/OS, a mainframe operating system which uses EBCDIC as its default character encoding, can be found at http://www.cbttape.org (File 939).

Documentation

You can read the PCRE2 documentation here.

Comparisons to Perl's regular expression semantics can be found in the community authored Wikipedia entry for PCRE.

There is a curated summary of changes for 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.

Contact

To report a problem with the PCRE2 library, or to make a feature request, please use the PCRE2 GitHub issues tracker. There is a mailing list for discussion of PCRE2 issues and development at pcre2-dev@googlegroups.com, which is where any announcements will be made. You can browse the list archives.