README file for PCRE2 (Perl-compatible regular expression library)

PCRE2 10.50-DEV documentation

PCRE2 is a re-working of the original PCRE1 library to provide an entirely new API. Since its initial release in 2015, there has been further development of the code and it now differs from PCRE1 in more than just the API. There are new features, and the internals have been improved. The original PCRE1 library is now obsolete and no longer maintained. The latest release of PCRE2 is available in .tar.gz, tar.bz2, or .zip form from this GitHub repository:

https://github.com/PCRE2Project/pcre2/releases

There is a mailing list for discussion about the development of PCRE2 at [email protected]. You can subscribe by sending an email to [email protected].

You can access the archives and also subscribe or manage your subscription here:

https://groups.google.com/g/pcre2-dev

Please read the NEWS file if you are upgrading from a previous release. The contents of this README.md file are:

The PCRE2 APIs

PCRE2 is written in C, and it has its own API. There are three sets of functions, one for the 8-bit library, which processes strings of bytes, one for the 16-bit library, which processes strings of 16-bit values, and one for the 32-bit library, which processes strings of 32-bit values. Unlike PCRE1, there are no C++ wrappers.

The distribution does contain a set of C wrapper functions for the 8-bit library that are based on the POSIX regular expression API (see the pcre2posix man page). These are built into a library called libpcre2-posix. Note that this just provides a POSIX calling interface to PCRE2; the regular expressions themselves still follow Perl syntax and semantics. The POSIX API is restricted, and does not give full access to all of PCRE2’s facilities.

The header file for the POSIX-style functions is called pcre2posix.h. The official POSIX name is regex.h, but I did not want to risk possible problems with existing files of that name by distributing it that way. To use PCRE2 with an existing program that uses the POSIX API, pcre2posix.h will have to be renamed or pointed at by a link (or the program modified, of course). See the pcre2posix documentation for more details.

Documentation for PCRE2

If you install PCRE2 in the normal way on a Unix-like system, you will end up with a set of man pages whose names all start with pcre2. The one that is just called pcre2 lists all the others. In addition to these man pages, the PCRE2 documentation is supplied in two other forms:

  1. There are files called doc/pcre2.txt, doc/pcre2grep.txt, and doc/pcre2test.txt in the source distribution. The first of these is a concatenation of the text forms of all the section 3 man pages except the listing of pcre2demo.c and those that summarize individual functions. The other two are the text forms of the section 1 man pages for the pcre2grep and pcre2test commands. These text forms are provided for ease of scanning with text editors or similar tools. They are installed in <prefix>/share/doc/pcre2, where <prefix> is the installation prefix (defaulting to /usr/local).

  2. A set of files containing all the documentation in HTML form, hyperlinked in various ways, and rooted in a file called index.html, is distributed in doc/html and installed in <prefix>/share/doc/pcre2/html.

Building PCRE2 on non-Unix-like systems

For a non-Unix-like system, please read the file NON-AUTOTOOLS-BUILD.md, though if your system supports the use of configure and make you may be able to build PCRE2 using autotools in the same way as for many Unix-like systems. This file also contains useful information on building for some unusual Unix environments (such as EBCDIC mainframes).

PCRE2 can also be configured using CMake, which can be run in various ways (command line, GUI, etc). This creates Makefiles, solution files, etc. The file NON-AUTOTOOLS-BUILD.md has information about CMake.

PCRE2 has been compiled on many different operating systems. It should be straightforward to build PCRE2 on any system that has a C99 or later compiler and library.

Building PCRE2 without using autotools

The use of autotools (in particular, libtool) is problematic in some environments, even some that are Unix or Unix-like. See the NON-AUTOTOOLS-BUILD.md file for ways of building PCRE2 without using autotools.

Building PCRE2 using autotools

The following instructions assume the use of the widely used configure; make; make install (autotools) process.

If you have downloaded and unpacked a PCRE2 release tarball, run the configure command from the PCRE2 directory, with your current directory set to the directory where you want the files to be created. This command is a standard GNU autoconf configuration script, for which generic instructions are supplied in the file INSTALL.

The files in the GitHub repository do not contain configure. If you have downloaded the PCRE2 source files from GitHub, before you can run configure you must run the shell script called autogen.sh. This runs a number of autotools to create a configure script (you must of course have the autotools commands installed in order to do this).

Most commonly, people build PCRE2 within its own distribution directory, and in this case, on many systems, just running ./configure is sufficient. However, the usual methods of changing standard defaults are available. For example:

CFLAGS='-O2 -Wall' ./configure --prefix=/opt/local

This command specifies that the C compiler should be run with the flags -O2 -Wall instead of the default, and that make install should install PCRE2 under /opt/local instead of the default /usr/local.

If you want to build in a different directory, just run configure with that directory as current. For example, suppose you have unpacked the PCRE2 source into /source/pcre2/pcre2-xxx, but you want to build it in /build/pcre2/pcre2-xxx:

cd /build/pcre2/pcre2-xxx
/source/pcre2/pcre2-xxx/configure

PCRE2 is written in C and is normally compiled as a C library. However, it is possible to build it as a C++ library, though the provided building apparatus does not have any features to support this.

There are some optional features that can be included or omitted from the PCRE2 library. They are also documented in the pcre2build man page.

The configure script builds the following files for the basic C library:

. Makefile             the makefile that builds the library
. src/config.h         build-time configuration options for the library
. src/pcre2.h          the public PCRE2 header file
. pcre2-config         script that shows the building settings such as CFLAGS
                         that were set for "configure"
. libpcre2-8.pc        )
. libpcre2-16.pc       ) data for the pkg-config command
. libpcre2-32.pc       )
. libpcre2-posix.pc    )
. libtool              script that builds shared and/or static libraries

Versions of config.h and pcre2.h are distributed in the src directory of PCRE2 tarballs under the names config.h.generic and pcre2.h.generic. These are provided for those who have to build PCRE2 without using configure or CMake. If you use configure or CMake, the .generic versions are not used.

The configure script also creates config.status, which is an executable script that can be run to recreate the configuration, and config.log, which contains compiler output from tests that configure runs.

Once configure has run, you can run make. This builds whichever of the libraries libpcre2-8, libpcre2-16 and libpcre2-32 are configured, and a test program called pcre2test. If you enabled JIT support with --enable-jit, another test program called pcre2_jit_test is built as well. If the 8-bit library is built, libpcre2-posix, pcre2posix_test, and the pcre2grep command are also built. Running make with the -j option may speed up compilation on multiprocessor systems.

The command make check runs all the appropriate tests. Details of the PCRE2 tests are given below in a separate section of this document. The -j option of make can also be used when running the tests.

You can use make install to install PCRE2 into live directories on your system. The following are installed (file names are all relative to the <prefix> that is set when configure is run):

Commands (bin):
  pcre2test
  pcre2grep (if 8-bit support is enabled)
  pcre2-config

Libraries (lib):
  libpcre2-8      (if 8-bit support is enabled)
  libpcre2-16     (if 16-bit support is enabled)
  libpcre2-32     (if 32-bit support is enabled)
  libpcre2-posix  (if 8-bit support is enabled)

Configuration information (lib/pkgconfig):
  libpcre2-8.pc
  libpcre2-16.pc
  libpcre2-32.pc
  libpcre2-posix.pc

Header files (include):
  pcre2.h
  pcre2posix.h

Man pages (share/man/man{1,3}):
  pcre2grep.1
  pcre2test.1
  pcre2-config.1
  pcre2.3
  pcre2*.3 (lots more pages, all starting "pcre2")

HTML documentation (share/doc/pcre2/html):
  index.html
  *.html (lots more pages, hyperlinked from index.html)

Text file documentation (share/doc/pcre2):
  AUTHORS.md
  ChangeLog
  LICENCE.md
  NEWS
  README.md
  SECURITY.md
  SUPPORT-LIFECYCLE.md
  pcre2.txt         (a concatenation of the man(3) pages)
  pcre2test.txt     the pcre2test man page
  pcre2grep.txt     the pcre2grep man page
  pcre2-config.txt  the pcre2-config man page

If you want to remove PCRE2 from your system, you can run make uninstall. This removes all the files that make install installed. However, it does not remove any directories, because these are often shared with other programs.

Retrieving configuration information

Running make install installs the command pcre2-config, which can be used to recall information about the PCRE2 configuration and installation. For example:

pcre2-config --version

prints the version number, and

pcre2-config --libs8

outputs information about where the 8-bit library is installed. This command can be included in makefiles for programs that use PCRE2, saving the programmer from having to remember too many details. Run pcre2-config with no arguments to obtain a list of possible arguments.

The pkg-config command is another system for saving and retrieving information about installed libraries. Instead of separate commands for each library, a single command is used. For example:

pkg-config --libs libpcre2-16

The data is held in *.pc files that are installed in a directory called <prefix>/lib/pkgconfig.

Shared libraries

The default distribution builds PCRE2 as shared libraries and static libraries, as long as the operating system supports shared libraries. Shared library support relies on the libtool script which is built as part of the configure process.

The libtool script is used to compile and link both shared and static libraries. They are placed in a subdirectory called .libs when they are newly built. The programs pcre2test and pcre2grep are built to use these uninstalled libraries (by means of wrapper scripts in the case of shared libraries). When you use make install to install shared libraries, pcre2grep and pcre2test are automatically re-built to use the newly installed shared libraries before being installed themselves. However, the versions left in the build directory still use the uninstalled libraries.

To build PCRE2 using static libraries only you must use --disable-shared when configuring it. For example:

./configure --prefix=/usr/gnu --disable-shared

Then run make in the usual way. Similarly, you can use --disable-static to build only shared libraries. Note, however, that when you build only static libraries, binary programs such as pcre2test and pcre2grep may still be dynamically linked with other libraries (for example, libc) unless you set LDFLAGS to --static when running configure.

Cross-compiling using autotools

You can specify CC and CFLAGS in the normal way to the configure command, in order to cross-compile PCRE2 for some other host. However, you should NOT specify --enable-rebuild-chartables, because if you do, the pcre2_dftables.c source file is compiled and run on the local host, in order to generate the inbuilt character tables (the pcre2_chartables.c file). This will probably not work, because pcre2_dftables.c needs to be compiled with the local compiler, not the cross compiler.

When --enable-rebuild-chartables is not specified, pcre2_chartables.c is created by making a copy of pcre2_chartables.c.dist, which is a default set of tables that assumes ASCII code. Cross-compiling with the default tables should not be a problem.

If you need to modify the character tables when cross-compiling, you should move pcre2_chartables.c.dist out of the way, then compile pcre2_dftables.c by hand and run it on the local host to make a new version of pcre2_chartables.c.dist. See the pcre2build section “Creating character tables at build time” for more details.

Making new tarballs

The command make dist creates three PCRE2 tarballs, in tar.gz, tar.bz2, and zip formats. The command make distcheck does the same, but then does a trial build of the new distribution to ensure that it works.

If you have modified any of the man page sources in the doc directory, you should first run the maint/UpdateAlways.rb script before making a distribution. This script creates the .txt and HTML forms of the documentation from the man pages.

Testing PCRE2

To test the basic PCRE2 library on a Unix-like system, run the RunTest shell script. A portable Python version is available as RunTest.py. There are corresponding RunGrepTest and RunGrepTest.py scripts that test the pcre2grep command. Run the scripts from the build directory; for example:

python3 ../RunTest.py
python3 ../RunGrepTest.py

When the 8-bit library is built, a test program for the POSIX wrapper, called pcre2posix_test, is compiled, and when JIT support is enabled, a test program called pcre2_jit_test is built. The scripts and the program tests are all run when you run make check. For other environments, see the instructions in NON-AUTOTOOLS-BUILD.md.

The RunTest (and RunTest.py) scripts run the pcre2test test program (which is documented in its own man page) on each of the relevant testinput files in the testdata directory, and compare the output with the contents of the corresponding testoutput files. The output is placed in directories testoutput{8,16,32}{,-jit,-dfa}. Other files whose names begin with test are used as working files in some tests.

Some tests are relevant only when certain build-time options were selected. For example, the tests for UTF-8/16/32 features are run only when Unicode support is available. RunTest outputs a comment when it skips a test.

Many (but not all) of the tests that are not skipped are run twice if JIT support is available. On the second run, JIT compilation is forced. This testing can be suppressed by putting -nojit on the RunTest command line.

The entire set of tests is run once for each of the 8-bit, 16-bit and 32-bit libraries that are enabled. If you want to run just one set of tests, call RunTest with either the -8, -16 or -32 option.

If valgrind is installed, you can run the tests under it by putting -valgrind on the RunTest command line. To run pcre2test on just one or more specific test files, give their numbers as arguments to RunTest, for example:

RunTest 2 7 11

You can also specify ranges of tests such as 3-6 or 3- (meaning 3 to the end), or a number preceded by ~ to exclude a test. For example:

RunTest 3-15 ~10

This runs tests 3 to 15, excluding test 10, and just ~13 runs all the tests except test 13. Whatever order the arguments are in, the tests are always run in numerical order.

You can also call RunTest with the single argument list to cause it to output a list of tests.

The test sequence starts with “test 0”, which is a special test that has no input file, and whose output is not checked. This is because it will be different on different hardware and with different configurations. The test exists in order to exercise some of pcre2test’s code that would not otherwise be run.

Tests 1 and 2 can always be run, as they expect only plain text strings (not UTF) and make no use of Unicode properties. The first test file can be fed directly into the PerlTest.sh script to check that Perl gives the same results. The RunPerlTest shell script runs and compares all Perl-compatible tests, or a single test selected by number (1, 4, 26, or 27). Use -perl command to select another Perl executable. To process a custom input file, use PerlTest.sh [-w] [-utf8] [-locale[=name]] input [output]; see PerlTest.sh for the input format. The only difference you should see is in the first few lines, where the Perl version is given instead of the PCRE2 version. Test 2 checks auxiliary functions, error detection, and run-time flags that are specific to PCRE2, and uses the debugging flags to check some of the internals of pcre2_compile().

If you build PCRE2 with a locale setting that is not the standard C locale, the character tables may be different (see next paragraph). In some cases, this may cause failures in the second set of tests. For example, in a locale where the isprint() function yields TRUE for characters in the range 128-255, the use of [:isascii:] inside a character class defines a different set of characters, and this shows up in this test as a difference in the compiled code, which is being listed for checking. For example, where the comparison test output contains [\x00-\x7f] the test might contain [\x00-\xff], and similarly in some other cases. This is not a bug in PCRE2.

Test 3 checks pcre2_maketables(), the facility for building a set of character tables for a specific locale and using them instead of the default tables. The script uses the locale command to check for the availability of the fr_FR, french, or fr locale, and uses the first one that it finds. If the locale command fails, or if its output doesn’t include fr_FR, french, or fr in the list of available locales, the third test cannot be run, and a comment is output to say why. If running this test produces an error like this:

** Failed to set locale "fr_FR"

it means that the given locale is not available on your system, despite being listed by locale. This does not mean that PCRE2 is broken. There are three alternative output files for the third test, because three different versions of the French locale have been encountered. The test passes if its output matches any one of them.

Tests 4 and 5 check UTF and Unicode property support, test 4 being compatible with the PerlTest.sh script, and test 5 checking PCRE2-specific things.

Tests 6 and 7 check the pcre2_dfa_match() alternative matching function, in non-UTF mode and UTF-mode with Unicode property support, respectively.

Test 8 checks some internal offsets and code size features, but it is run only when Unicode support is enabled. The output is different in 8-bit, 16-bit, and 32-bit modes and for different link sizes, so there are different output files for each mode and link size.

Tests 9 and 10 are run only in 8-bit mode, and tests 11 and 12 are run only in 16-bit and 32-bit modes. These are tests that generate different output in 8-bit mode. Each pair are for general cases and Unicode support, respectively.

Test 13 checks the handling of non-UTF characters greater than 255 by pcre2_dfa_match() in 16-bit and 32-bit modes.

Test 14 contains some special UTF and UCP tests that give different output for different code unit widths.

Test 15 contains a number of tests that must not be run with JIT. They check, among other non-JIT things, the match-limiting features of the interpretive matcher.

Test 16 is run only when JIT support is not available. It checks that an attempt to use JIT has the expected behaviour.

Test 17 is run only when JIT support is available. It checks JIT complete and partial modes, match-limiting under JIT, and other JIT-specific features.

Tests 18 and 19 are run only in 8-bit mode. They check the POSIX interface to the 8-bit library, without and with Unicode support, respectively.

Test 20 checks the serialization functions by writing a set of compiled patterns to a file, and then reloading and checking them.

Tests 21 and 22 test \C support when the use of \C is not locked out, without and with UTF support, respectively. Test 23 tests \C when it is locked out.

Tests 24 and 25 test the experimental pattern conversion functions, without and with UTF support, respectively.

Test 26 checks Unicode property support using tests that were generated automatically from the Unicode data tables. These are the archived version of the tests from Unicode 15.

Test 27 checks Unicode property support using tests that are generated automatically from the currently-used Unicode data tables.

Test 28 tests EBCDIC support, and is only run when PCRE2 is specifically compiled for EBCDIC. Test 29 tests EBCDIC when NL has been configured to be 0x25.

Character tables

For speed, PCRE2 uses four tables for manipulating and identifying characters whose code point values are less than 256. By default, a set of tables that is built into the library is used. The pcre2_maketables() function can be called by an application to create a new set of tables in the current locale. This are passed to PCRE2 by calling pcre2_set_character_tables() to put a pointer into a compile context.

The source file called pcre2_chartables.c contains the default set of tables. By default, this is created as a copy of pcre2_chartables.c.dist, which contains tables for ASCII coding. However, if --enable-rebuild-chartables is specified for ./configure, a new version of pcre2_chartables.c is built by the program pcre2_dftables (compiled from pcre2_dftables.c), which uses the ANSI C character handling functions such as isalnum(), isalpha(), isupper(), islower(), etc. to build the table sources. This means that the default C locale that is set for your system will control the contents of these default tables. You can change the default tables by editing pcre2_chartables.c and then re-building PCRE2. If you do this, you should take care to ensure that the file does not get automatically re-generated. The best way to do this is to move pcre2_chartables.c.dist out of the way and replace it with your customized tables.

When the pcre2_dftables program is run as a result of specifying --enable-rebuild-chartables, it uses the default C locale that is set on your system. It does not pay attention to the LC_xxx environment variables. In other words, it uses the system’s default locale rather than whatever the compiling user happens to have set. If you really do want to build a source set of character tables in a locale that is specified by the LC_xxx variables, you can run the pcre2_dftables program by hand with the -L option. For example:

./pcre2_dftables -L pcre2_chartables.c.special

The second argument names the file where the source code for the tables is written. The first two 256-byte tables provide lower casing and case flipping functions, respectively. The next table consists of a number of 32-byte bit maps which identify certain character classes such as digits, “word” characters, white space, etc. These are used when building 32-byte bit maps that represent character classes for code points less than 256. The final 256-byte table has bits indicating various character types, as follows:

 1   white space character
 2   letter
 4   lower case letter
 8   decimal digit
16   alphanumeric or '_'

You can also specify -b (with or without -L) when running pcre2_dftables. This causes the tables to be written in binary instead of as source code. A set of binary tables can be loaded into memory by an application and passed to pcre2_compile() in the same way as tables created dynamically by calling pcre2_maketables(). The tables are just a string of bytes, independent of hardware characteristics such as endianness. This means they can be bundled with an application that runs in different environments, to ensure consistent behaviour.

See also the pcre2build section “Creating character tables at build time”.

File manifest

The distribution should contain the files listed below.

(A) Source files for the PCRE2 library functions and their headers are found in
    the src directory:

  src/pcre2_dftables.c     auxiliary program for building pcre2_chartables.c
                           when --enable-rebuild-chartables is specified

  src/pcre2_chartables.c.dist  a default set of character tables that assume
                           ASCII coding; unless --enable-rebuild-chartables is
                           specified, used by copying to pcre2_chartables.c
  src/pcre2_chartables.c.ebcdic-1047-{nl15,nl25}  a default set of character
                           tables for EBCDIC 1047; used if
                           --enable-ebcdic-ignoring-compiler is specified
                           without --enable-rebuild-chartables

  src/pcre2posix.c           )
  src/pcre2_auto_possess.c   )
  src/pcre2_chkdint.c        )
  src/pcre2_compile.c        )
  src/pcre2_compile_cgroup.c )
  src/pcre2_compile_class.c  )
  src/pcre2_config.c         )
  src/pcre2_context.c        )
  src/pcre2_convert.c        )
  src/pcre2_dfa_match.c      )
  src/pcre2_error.c          )
  src/pcre2_extuni.c         )
  src/pcre2_find_bracket.c   )
  src/pcre2_jit_compile.c    )
  src/pcre2_maketables.c     ) sources for the functions in the library,
  src/pcre2_match.c          )   and some internal functions that they use
  src/pcre2_match_data.c     )
  src/pcre2_match_next.c     )
  src/pcre2_newline.c        )
  src/pcre2_ord2utf.c        )
  src/pcre2_pattern_info.c   )
  src/pcre2_script_run.c     )
  src/pcre2_serialize.c      )
  src/pcre2_string_utils.c   )
  src/pcre2_study.c          )
  src/pcre2_substitute.c     )
  src/pcre2_substring.c      )
  src/pcre2_tables.c         )
  src/pcre2_ucd.c            )
  src/pcre2_valid_utf.c      )
  src/pcre2_xclass.c         )

  src/pcre2_fuzzsupport.c  function for (optional) fuzzing support

  src/config.h.in          template for config.h, when built by "configure"
  src/pcre2.h.in           template for pcre2.h when built by "configure"
  src/pcre2posix.h         header for the external POSIX wrapper API
  src/pcre2_compile.h      header for internal use
  src/pcre2_internal.h     header for internal use
  src/pcre2_intmodedep.h   a mode-specific internal header
  src/pcre2_jit_char_inc.h header used by JIT
  src/pcre2_jit_match_inc.h header used by JIT
  src/pcre2_jit_misc_inc.h header used by JIT
  src/pcre2_jit_simd_inc.h header used by JIT
  src/pcre2_printint_inc.h debugging function that is used by pcre2test
  src/pcre2_ucp.h          header for Unicode property handling
  src/pcre2_ucptables_inc.h header with Unicode data tables
  src/pcre2_util.h         header for internal utils

  deps/sljit/sljit_src/*   source files for the JIT compiler

(B) Source files for programs that use PCRE2:

  src/pcre2demo.c          simple demonstration of coding calls to PCRE2
  src/pcre2grep.c          source of a grep utility that uses PCRE2
  src/pcre2test.c          comprehensive test program
  src/pcre2test_inc.h      header used by pcre2test
  src/pcre2_jit_test.c     JIT test program
  src/pcre2posix_test.c    POSIX wrapper API test program

(C) Auxiliary files:

  AUTHORS.md               information about the authors of PCRE2
  ChangeLog                log of changes to the code
  HACKING                  some notes about the internals of PCRE2
  INSTALL                  generic installation instructions
  LICENCE.md               conditions for the use of PCRE2
  SECURITY.md              information on reporting vulnerabilities
  SUPPORT-LIFECYCLE.md     information on the support policy
  Makefile.in              ) template for Unix Makefile, which is built by
                           )   "configure"
  Makefile.am              ) the automake input that was used to create
                           )   Makefile.in
  NEWS                     important changes in this release
  NON-AUTOTOOLS-BUILD.md   notes on building PCRE2 without using autotools
  PerlTest.sh              Perl-compatible regular expression test program
  README.md                this file
  RunTest                  a Unix shell script for running tests
  RunTest.py               a portable Python script for running tests
  RunPerlTest              Shell driver for Perl tests and output comparison
  RunGrepTest              a Unix shell script for pcre2grep tests
  RunGrepTest.py           a portable Python script for pcre2grep tests
  aclocal.m4               m4 macros (generated by "aclocal")
  m4/*                     m4 macros (used by autoconf)
  configure                a configuring shell script (built by autoconf)
  configure.ac             ) the autoconf input that was used to build
                           )   "configure" and config.h
  doc/*.3                  man page sources for PCRE2
  doc/*.1                  man page sources for pcre2grep and pcre2test
  doc/html/*               HTML documentation
  doc/pcre2.txt            plain text version of the man pages
  doc/pcre2-config.txt     plain text documentation of pcre2-config script
  doc/pcre2grep.txt        plain text documentation of grep utility program
  doc/pcre2test.txt        plain text documentation of test program
  libpcre2-8.pc.in         template for libpcre2-8.pc for pkg-config
  libpcre2-16.pc.in        template for libpcre2-16.pc for pkg-config
  libpcre2-32.pc.in        template for libpcre2-32.pc for pkg-config
  libpcre2-posix.pc.in     template for libpcre2-posix.pc for pkg-config
  ar-lib                   )
  config.guess             )
  config.sub               )
  depcomp                  ) helper tools generated by libtool and
  compile                  )   automake, used internally by ./configure
  install-sh               )
  ltmain.sh                )
  missing                  )
  test-driver              )
  pcre2-config.in          source of script which retains PCRE2 information
  testdata/testinput*      test data for main library tests
  testdata/testoutput*     expected test results
  testdata/grep*           input and output for pcre2grep tests
  testdata/*               other supporting test files
  src/libpcre2-8.sym.in     )
  src/libpcre2-16.sym.in    ) symbol version script templates for the
  src/libpcre2-32.sym.in    ) GNU, BSD and Sun linkers
  src/libpcre2-posix.sym.in )

(D) Auxiliary files for CMake support

  cmake/COPYING-CMAKE-SCRIPTS
  cmake/FindEditline.cmake
  cmake/FindReadline.cmake
  cmake/pcre2-config.cmake.in
  cmake/PCRE2CheckVscript.cmake
  cmake/PCRE2UseSystemExtensions.cmake
  cmake/PCRE2WarningAsError.cmake
  src/config-cmake.h.in
  CMakeLists.txt

(E) Auxiliary files for building PCRE2 "by hand"

  src/pcre2.h.generic     ) a version of the public PCRE2 header file
                          )   for use in non-"configure" environments
  src/config.h.generic    ) a version of config.h for use in non-"configure"
                          )   environments

(F) Auxiliary files for building PCRE2 using other build systems

  BUILD.bazel             ) files used by the Bazel
  MODULE.bazel            )   build system
  build.zig               file used by zig's build system
  build.zig.zon           file used by zig's package manager

(G) Auxiliary files for building PCRE2 under OpenVMS

  vms/configure.com       )
  vms/openvms_readme.txt  ) These files were contributed by a PCRE2 user.
  vms/pcre2.h_patch       )
  vms/stdint.h            )

Last updated: 08 August 2026