PCRE - Perl-compatible regular expressions | Search for a title, author or keyword | ||||||||
PCRE - Perl-compatible regular expressions By Philip Hazel, University of Cambridge, Last updated: 24 August 2011. The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5. PCRE was originally written for the Exim MTA ( a message transfer agent, MTA, developed at the University of Cambridge for use on Unix systems connected to the Internet ), but is now used by many high-profile open source projects, including Apache, PHP, KDE ( a free and user-friendly graphical desktop ), Postfix ( a mail server alternative to the widely-used Sendmail program ), Analog ( the most popular logfile analyser in the world ), and Nmap ( Network Mapper ). PCRE has also found its way into some well known commercial products, like Apple Safari. Some other interesting projects using PCRE include Chicken ( a compiler for the Scheme programming language ), Ferite ( a clean programming language ), Onyx ( a programming language ), Hypermail ( a free, GPL, program to convert email from Unix mbox format to html ), Leafnode ( a NNTP Server For Small Sites ), Askemos ( an autonomous, distributed operating system or agent execution environment on top of peer to peer networks ), and Wenlin ( a Software for Learning Chinese ). This file contains a concatenation of the PCRE man pages, converted to plain text format for ease of searching with a text editor, or for use on systems that do not have a man page processor. A regular expression is a pattern that is matched against a subject string from left to right. Most characters stand for themselves in a pattern, and match the corresponding characters in the subject. As a trivial example, the pattern "The quick brown fox" matches a portion of a subject string that is identical to itself. The power of regular expressions comes from the ability to include alternatives and repetitions in the pattern. These are encoded in the pattern by the use of metacharacters, which do not stand for themselves but instead are interpreted in some special way. For example, the pattern "The.+fox" will find on a subject string a sequence starting with "The", ending with "fox", with at least one character ( spaces included ) in the middle: "The fox", "The love fox", "The quick brown fox".
|
|||||||||
PCRE - Perl-compatible regular expressions | Disclaimer: this link points to content provided by other sites. |