diff --git a/reference/pcre/constants.xml b/reference/pcre/constants.xml new file mode 100644 index 0000000000..38f2465906 --- /dev/null +++ b/reference/pcre/constants.xml @@ -0,0 +1,91 @@ + + +
+ &reftitle.constants; + &extension.constants; + + PREG constants + + + + constant + description + + + + + PREG_PATTERN_ORDER + + Orders results so that $matches[0] is an array of full pattern + matches, $matches[1] is an array of strings matched by the first + parenthesized subpattern, and so on. This flag is only used with + preg_match_all. + + + + PREG_SET_ORDER + + Orders results so that $matches[0] is an array of first set of + matches, $matches[1] is an array of second set of matches, and so + on. This flag is only used with preg_match_all. + + + + PREG_OFFSET_CAPTURE + + See the description of + PREG_SPLIT_OFFSET_CAPTURE. This flag is + available since PHP 4.3.0 . + + + + PREG_SPLIT_NO_EMPTY + + This flag tells preg_split to only return only + non-empty pieces. + + + + PREG_SPLIT_DELIM_CAPTURE + + This flag tells preg_split to capture + parenthesized expression in the delimiter pattern as well. This flag + is available since PHP 4.0.5 . + + + + PREG_SPLIT_OFFSET_CAPTURE + + If this flag is set, for every occuring match the appendant string + offset will also be returned. Note that this changes the return + value in an array where very element is an array consisting of the + matched string at offset 0 and it's string offset into subject at + offset 1. This flag is available since PHP 4.3.0 + and is only used for preg_split. + + + + +
+
+ + diff --git a/reference/pcre/reference.xml b/reference/pcre/reference.xml index c02a47e7c9..185652aa42 100644 --- a/reference/pcre/reference.xml +++ b/reference/pcre/reference.xml @@ -1,31 +1,34 @@ - + Regular Expression Functions (Perl-Compatible) PCRE - - 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. - - - The ending delimiter may be followed by various modifiers that - affect the matching. - See Pattern Modifiers. - - - PHP also supports regular expressions using a POSIX-extended syntax - using the POSIX-extended regex functions.. - +
+ &reftitle.intro; + + 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. + + + The ending delimiter may be followed by various modifiers that + affect the matching. + See Pattern Modifiers. + + + PHP also supports regular expressions using a POSIX-extended syntax + using the POSIX-extended regex functions.. + +
- Requirements + &reftitle.required; Regular expression support is provided by the PCRE library package, which is open source software, written by Philip Hazel, @@ -35,7 +38,7 @@
- Installation + &reftitle.install; Beginning with PHP 4.2.0 this function are enabled by default. For older versions you have to configure and compile PHP @@ -46,87 +49,19 @@
- Runtime Configuration - &no.config; + &reftitle.runtime; + &no.config;
- Resource types - &no.resource; + &reftitle.resources; + &no.resource;
-
- Predefined constants - - - PREG constants - - - - constant - description - - - - - PREG_PATTERN_ORDER - - Orders results so that $matches[0] is an array of full pattern - matches, $matches[1] is an array of strings matched by the first - parenthesized subpattern, and so on. This flag is only used with - preg_match_all. - - - - PREG_SET_ORDER - - Orders results so that $matches[0] is an array of first set of - matches, $matches[1] is an array of second set of matches, and so - on. This flag is only used with preg_match_all. - - - - PREG_OFFSET_CAPTURE - - See the description of - PREG_SPLIT_OFFSET_CAPTURE. This flag is - available since PHP 4.3.0 . - - - - PREG_SPLIT_NO_EMPTY - - This flag tells preg_split to only return only - non-empty pieces. - - - - PREG_SPLIT_DELIM_CAPTURE - - This flag tells preg_split to capture - parenthesized expression in the delimiter pattern as well. This flag - is available since PHP 4.0.5 . - - - - PREG_SPLIT_OFFSET_CAPTURE - - If this flag is set, for every occuring match the appendant string - offset will also be returned. Note that this changes the return - value in an array where very element is an array consisting of the - matched string at offset 0 and it's string offset into subject at - offset 1. This flag is available since PHP 4.3.0 - and is only used for preg_split. - - - - -
-
-
+ &reference.pcre.constants;
- Examples + &reftitle.examples; Examples of valid patterns @@ -161,7 +96,6 @@
-
&reference.pcre.functions;