<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Introduction</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="reference.pcre.pattern.syntax.html">PCRE regex syntax</a></div> <div class="next" style="text-align: right; float: right;"><a href="regexp.reference.delimiters.html">Delimiters</a></div> <div class="up"><a href="reference.pcre.pattern.syntax.html">PCRE regex syntax</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="regexp.introduction" class="section"> <h2 class="title">Introduction</h2> <p class="para"> The syntax and semantics of the regular expressions supported by PCRE are described below. Regular expressions are also described in the Perl documentation and in a number of other books, some of which have copious examples. Jeffrey Friedl's "Mastering Regular Expressions", published by O'Reilly (ISBN 1-56592-257-3), covers them in great detail. The description here is intended as reference documentation. </p> <p class="para"> 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 <em>The quick brown fox</em> matches a portion of a subject string that is identical to itself. </p> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="reference.pcre.pattern.syntax.html">PCRE regex syntax</a></div> <div class="next" style="text-align: right; float: right;"><a href="regexp.reference.delimiters.html">Delimiters</a></div> <div class="up"><a href="reference.pcre.pattern.syntax.html">PCRE regex syntax</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>