Perl Compatible Regular Expressions

Perl Compatible Regular Expressions (PCRE) is a regular expression C library inspired by Perl's external interface, written by Philip Hazel. PCRE's syntax is much more powerful and flexible than either of the POSIX regular expression flavors and many classic regular expression libraries. The name is misleading, because PCRE and Perl each have capabilities not shared by the other.

The PCRE library is incorporated into a number of prominent open-source programs, such as the Apache HTTP Server and the PHP and R scripting languages; and can be incorporated in proprietary software too (BSD license). As of Perl 5.10, PCRE is also available as a replacement for Perl's default regular expression engine through the re::engine::PCRE module.

The library can be built using configure and make (typical of Unix-like environments), as well as in Unix, Windows and other environments using CMake. Numerous default settings are chosen at build time. In addition to the PCRE library, a POSIX C wrapper, a Google-contributed native C++ wrapper, several test programs, and the utility program pcregrep are also included in the distribution and are built in tandem with the library. The PCRE library provides matching only; the C++ wrapper, if used, adds multiple match and replacement functionality.

Unless the "NoRecurse" PCRE build option (aka "--disable-stack-for-recursion") is chosen, adequate stack space must be allocated to PCRE by the calling application or operating system. The amount of stack needed varies for each pattern. For example, to complete the tests provided with pcretest, 8 MB of stack space would be needed. While PCRE's documentation cautions that the "NoRecurse" build option makes PCRE slower than the alternative, using it avoids entirely the issue of stack overflows.

Read more about Perl Compatible Regular Expressions:  Features, Differences From Perl

Famous quotes containing the words compatible, regular and/or expressions:

    I have no ambition to surprise my reader. Castles with unknown passages are not compatible with my homely muse.
    Anthony Trollope (1815–1882)

    The solid and well-defined fir-tops, like sharp and regular spearheads, black against the sky, gave a peculiar, dark, and sombre look to the forest.
    Henry David Thoreau (1817–1862)

    Each child has his own individual expressions to offer to the world. That expression can take many forms, from artistic interests, a way of thinking, athletic activities, a particular style of dressing, musical talents, different hobbies, etc. Our job is to join our children in discovering who they are.
    Stephanie Martson (20th century)