cvs: phpdoc /en/reference/regex reference.xml

From: Date: Wed, 07 Aug 2002 10:04:09 +0000
Subject: cvs: phpdoc /en/reference/regex reference.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969347865@lists.php.net to get a copy of this message
betz Wed Aug 7 06:04:09 2002 EDT Modified files: /phpdoc/en/reference/regex reference.xml Log: new structure applied Index: phpdoc/en/reference/regex/reference.xml diff -u phpdoc/en/reference/regex/reference.xml:1.2 phpdoc/en/reference/regex/reference.xml:1.3 --- phpdoc/en/reference/regex/reference.xml:1.2 Mon Apr 15 17:57:21 2002 +++ phpdoc/en/reference/regex/reference.xml Wed Aug 7 06:04:08 2002 @@ -1,60 +1,91 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <reference id="ref.regex"> <title>Regular Expression Functions (POSIX Extended)</title> <titleabbrev>Regexps</titleabbrev> <partintro> - <note> + <section id="regex.intro"> + &reftitle.intro; + <note> + <para> + PHP also supports regular expressions using a Perl-compatible syntax + using the <link linkend="ref.pcre">PCRE functions</link>. Those functions + support non-greedy matching, assertions, conditional subpatterns, and a + number of other features not supported by the POSIX-extended regular + expression syntax. + </para> + </note> + <warning> + <para> + These regular expression functions are not binary-safe. The <link + linkend="ref.pcre">PCRE functions</link> are. + </para> + </warning> <para> - PHP also supports regular expressions using a Perl-compatible syntax - using the <link linkend="ref.pcre">PCRE functions</link>. Those functions - support non-greedy matching, assertions, conditional subpatterns, and a - number of other features not supported by the POSIX-extended regular - expression syntax. + Regular expressions are used for complex string manipulation in + PHP. The functions that support regular expressions are: + <itemizedlist> + <listitem> + <simpara><function>ereg</function></simpara> + </listitem> + <listitem> + <simpara><function>ereg_replace</function></simpara> + </listitem> + <listitem> + <simpara><function>eregi</function></simpara> + </listitem> + <listitem> + <simpara><function>eregi_replace</function></simpara> + </listitem> + <listitem> + <simpara><function>split</function></simpara> + </listitem> + <listitem> + <simpara><function>spliti</function></simpara> + </listitem> + </itemizedlist> + These functions all take a regular expression string as their + first argument. PHP uses the POSIX extended regular expressions + as defined by POSIX 1003.2. For a full description of POSIX + regular expressions see the regex man pages included in the regex + directory in the PHP distribution. It's in manpage format, so + you'll want to do something along the lines of <command>man + /usr/local/src/regex/regex.7</command> in order to read it. </para> - </note> - <warning> + </section> + + <section id="regex.requirenments"> + &reftitle.required; + &no.requirement; + </section> + + <section id="regex.installation"> + &reftitle.install; + &no.install; + </section> + + <section id="regex.configuration"> + &reftitle.runtime; + &no.config; + </section> + + <section id="regex.resources"> + &reftitle.resources; + &no.resource; + </section> + + <section id="regex.constants"> + &reftitle.constants; + &no.constants; + </section> + + <section id="regex.examples"> + &reftitle.examples; <para> - These regular expression functions are not binary-safe. The <link - linkend="ref.pcre">PCRE functions</link> are. - </para> - </warning> - <para> - Regular expressions are used for complex string manipulation in - PHP. The functions that support regular expressions are: - <itemizedlist> - <listitem> - <simpara><function>ereg</function></simpara> - </listitem> - <listitem> - <simpara><function>ereg_replace</function></simpara> - </listitem> - <listitem> - <simpara><function>eregi</function></simpara> - </listitem> - <listitem> - <simpara><function>eregi_replace</function></simpara> - </listitem> - <listitem> - <simpara><function>split</function></simpara> - </listitem> - <listitem> - <simpara><function>spliti</function></simpara> - </listitem> - </itemizedlist> - These functions all take a regular expression string as their - first argument. PHP uses the POSIX extended regular expressions - as defined by POSIX 1003.2. For a full description of POSIX - regular expressions see the regex man pages included in the regex - directory in the PHP distribution. It's in manpage format, so - you'll want to do something along the lines of <command>man - /usr/local/src/regex/regex.7</command> in order to read it. - </para> - <para> - <example> + <example> <title>Regular Expression Examples</title> - <programlisting role="php"> + <programlisting role="php"> <![CDATA[ ereg ("abc", $string); /* Returns true if"abc" @@ -86,9 +117,18 @@ /* Get rid of any newline characters in $string. */ ]]> - </programlisting> - </example> - </para> + </programlisting> + </example> + </para> + </section> + + <section id="regex.seealso"> + &reftitle.seealso; + <para> + For regular expressions in Perl-compatible syntax have a look at the + <link linkend="ref.pcre">PCRE functions</link>. + </para> + </section> </partintro> &reference.regex.functions;

« previous php.doc (#969347865) next »