mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
MFB: Upgrade to the new-reference-structure
- Split reference.xml into book.xml, setup.xml, pattern.xml, and examples.xml - Moved from reference.xml to book.xml: - The intro text (partintro), and link to various pages - Moved from reference.xml to setup.xml: - The requirements, installation, configuration, and resources - Changed the constants section to be an <appendix> - Changed pattern.modifiers.xml from refentry to article - Changed pattern.syntax.xml from refentry to article - Changed refsect1 and refsect2 to sections within the new articles - Changed the intro ID from <extname>.intro to intro.<extname> git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@248797 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
75c88000bc
commit
dcf96bd468
6 changed files with 215 additions and 102 deletions
75
reference/pcre/book.xml
Normal file
75
reference/pcre/book.xml
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- Purpose: basic.text -->
|
||||
<!-- Membership: bundled -->
|
||||
|
||||
<book xml:id="book.pcre" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Regular Expression Functions (Perl-Compatible)</title>
|
||||
<titleabbrev>PCRE</titleabbrev>
|
||||
|
||||
<preface xml:id="intro.pcre">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
The syntax for patterns used in these functions closely resembles
|
||||
Perl. The expression should be enclosed in the delimiters, a
|
||||
forward slash (/), for example. Any character can be used for
|
||||
delimiter as long as it's not alphanumeric or backslash (\). If
|
||||
the delimiter character has to be used in the expression itself,
|
||||
it needs to be escaped by backslash. Since PHP 4.0.4, you can also use
|
||||
Perl-style (), {}, [], and <> matching delimiters.
|
||||
See <link linkend="reference.pcre.pattern.syntax">Pattern Syntax</link>
|
||||
for detailed explanation.
|
||||
</para>
|
||||
<para>
|
||||
The ending delimiter may be followed by various modifiers that
|
||||
affect the matching.
|
||||
See <link linkend="reference.pcre.pattern.modifiers">Pattern
|
||||
Modifiers</link>.
|
||||
</para>
|
||||
<para>
|
||||
PHP also supports regular expressions using a POSIX-extended syntax
|
||||
using the <link linkend="book.regex">POSIX-extended regex functions</link>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
This extension maintains a global per-thread cache of compiled regular
|
||||
expressions (up to 4096).
|
||||
</para>
|
||||
</note>
|
||||
<warning>
|
||||
<para>
|
||||
You should be aware of some limitations of PCRE. Read <link
|
||||
xlink:href="&url.pcre.man;">&url.pcre.man;</link> for more info.
|
||||
</para>
|
||||
</warning>
|
||||
</preface>
|
||||
|
||||
&reference.pcre.setup;
|
||||
&reference.pcre.constants;
|
||||
&reference.pcre.examples;
|
||||
&reference.pcre.pattern;
|
||||
&reference.pcre.reference;
|
||||
|
||||
</book>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<section xml:id="pcre.constants" xmlns="http://docbook.org/ns/docbook">
|
||||
<!-- $Revision: 1.14 $ -->
|
||||
<appendix xml:id="pcre.constants" xmlns="http://docbook.org/ns/docbook">
|
||||
&reftitle.constants;
|
||||
&extension.constants;
|
||||
<table>
|
||||
|
@ -113,7 +113,7 @@
|
|||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</section>
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
60
reference/pcre/examples.xml
Normal file
60
reference/pcre/examples.xml
Normal file
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<appendix xml:id="pcre.examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Examples of valid patterns</title>
|
||||
<itemizedlist>
|
||||
<listitem><simpara><literal>/<\/\w+>/</literal></simpara></listitem>
|
||||
<listitem><simpara><literal>|(\d{3})-\d+|Sm</literal></simpara></listitem>
|
||||
<listitem><simpara><literal>/^(?i)php[34]/</literal></simpara></listitem>
|
||||
<listitem><simpara><literal>{^\s+(\s+)?$}</literal></simpara></listitem>
|
||||
</itemizedlist>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Examples of invalid patterns</title>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>/href='(.*)'</literal> - missing ending delimiter
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>/\w+\s*\w+/J</literal> - unknown modifier 'J'
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>1-\d3-\d3-\d4|</literal> - missing starting delimiter
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</example>
|
||||
</para>
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
32
reference/pcre/pattern.xml
Normal file
32
reference/pcre/pattern.xml
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
|
||||
<part xml:id="pcre.pattern">
|
||||
<title>PCRE Patterns</title>
|
||||
|
||||
&reference.pcre.pattern.modifiers;
|
||||
&reference.pcre.pattern.syntax;
|
||||
|
||||
</part>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
|
@ -1,106 +1,10 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.19 $ -->
|
||||
<!-- Purpose: basic.text -->
|
||||
<!-- Membership: bundled -->
|
||||
<!-- $Revision: 1.20 $ -->
|
||||
|
||||
<reference xml:id="ref.pcre" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Regular Expression Functions (Perl-Compatible)</title>
|
||||
<titleabbrev>PCRE</titleabbrev>
|
||||
<title>PCRE &Functions;</title>
|
||||
|
||||
<partintro>
|
||||
<section xml:id="pcre.intro">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
The syntax for patterns used in these functions closely resembles
|
||||
Perl. The expression should be enclosed in the delimiters, a
|
||||
forward slash (/), for example. Any character can be used for
|
||||
delimiter as long as it's not alphanumeric or backslash (\). If
|
||||
the delimiter character has to be used in the expression itself,
|
||||
it needs to be escaped by backslash. Since PHP 4.0.4, you can also use
|
||||
Perl-style (), {}, [], and <> matching delimiters.
|
||||
See <link linkend="reference.pcre.pattern.syntax">Pattern Syntax</link>
|
||||
for detailed explanation.
|
||||
</para>
|
||||
<para>
|
||||
The ending delimiter may be followed by various modifiers that
|
||||
affect the matching.
|
||||
See <link linkend="reference.pcre.pattern.modifiers">Pattern
|
||||
Modifiers</link>.
|
||||
</para>
|
||||
<para>
|
||||
PHP also supports regular expressions using a POSIX-extended syntax
|
||||
using the <link linkend="ref.regex">POSIX-extended regex functions</link>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
This extension maintains a global per-thread cache of compiled regular
|
||||
expressions (up to 4096).
|
||||
</para>
|
||||
</note>
|
||||
<warning>
|
||||
<para>
|
||||
You should be aware of some limitations of PCRE. Read <link
|
||||
xlink:href="&url.pcre.man;">&url.pcre.man;</link> for more info.
|
||||
</para>
|
||||
</warning>
|
||||
</section>
|
||||
|
||||
<section xml:id="pcre.requirements">
|
||||
&reftitle.required;
|
||||
&no.requirement;
|
||||
</section>
|
||||
|
||||
&reference.pcre.configure;
|
||||
&reference.pcre.ini;
|
||||
|
||||
<section xml:id="pcre.resources">
|
||||
&reftitle.resources;
|
||||
&no.resource;
|
||||
</section>
|
||||
|
||||
&reference.pcre.constants;
|
||||
|
||||
<section xml:id="pcre.examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Examples of valid patterns</title>
|
||||
<itemizedlist>
|
||||
<listitem><simpara><literal>/<\/\w+>/</literal></simpara></listitem>
|
||||
<listitem><simpara><literal>|(\d{3})-\d+|Sm</literal></simpara></listitem>
|
||||
<listitem><simpara><literal>/^(?i)php[34]/</literal></simpara></listitem>
|
||||
<listitem><simpara><literal>{^\s+(\s+)?$}</literal></simpara></listitem>
|
||||
</itemizedlist>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Examples of invalid patterns</title>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>/href='(.*)'</literal> - missing ending delimiter
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>/\w+\s*\w+/J</literal> - unknown modifier 'J'
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>1-\d3-\d3-\d4|</literal> - missing starting delimiter
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</example>
|
||||
</para>
|
||||
</section>
|
||||
</partintro>
|
||||
|
||||
&reference.pcre.pattern.modifiers;
|
||||
&reference.pcre.pattern.syntax;
|
||||
&reference.pcre.entities.functions;
|
||||
&reference.pcre.entities.functions;
|
||||
|
||||
</reference>
|
||||
|
||||
|
|
42
reference/pcre/setup.xml
Normal file
42
reference/pcre/setup.xml
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<chapter xml:id="pcre.setup">
|
||||
&reftitle.setup;
|
||||
|
||||
<section xml:id="pcre.requirements">
|
||||
&reftitle.required;
|
||||
&no.requirement;
|
||||
</section>
|
||||
|
||||
&reference.pcre.configure;
|
||||
|
||||
&reference.pcre.ini;
|
||||
|
||||
<section xml:id="pcre.resources">
|
||||
&reftitle.resources;
|
||||
&no.resource;
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
Loading…
Reference in a new issue