6.20. PCRE-8.12

The PCRE package contains Perl Compatible Regular Expression libraries. These are useful for implementing regular expression pattern matching using the same syntax and semantics as Perl 5.

Approximate build time: 0.4 SBU
Required disk space: 12 MB

6.20.1. Installation of PCRE

Prepare PCRE for compilation:

./configure --prefix=/usr \
            --docdir=/usr/share/doc/pcre-8.12 \
            --enable-utf8 \
            --enable-unicode-properties \
            --enable-pcregrep-libz \

The meaning of the configure options:


This switch includes the code for handling UTF-8 character strings in the library.


This switch enables Unicode properties support.


These switches enable the PCRE library to read files compressed with gzip and bzip2.

Compile the package:


To test the results, issue:

make check

Install the package:

make install

The grep binary will be installed in /bin and will link against the PCRE library; as such, move the library to /lib:

mv -v /usr/lib/libpcre.so.* /lib/
ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so

6.20.2. Contents of PCRE

Installed programs: pcregrep, pcretest, and pcre-config
Installed libraries: libpcre.{so,a}, libpcrecpp.{so,a} and libpcreposix.{so,a}
Installed directories: /usr/share/doc/pcre-8.12

Short Descriptions


A grep that understands Perl compatible regular expressions.


Tests a Perl compatible regular expression.


Used during the compilation process of programs linking to the PCRE libraries.


Provides functions useful for working with regular expressions.


Provides C++ wrapper functions for the libpcre library.


Provides wrapper functions based on the POSIX regular expression API.