Index: phpdoc/en/reference/pcre/reference.xml diff -u phpdoc/en/reference/pcre/reference.xml:1.2 phpdoc/en/reference/pcre/reference.xml:1.3 --- phpdoc/en/reference/pcre/reference.xml:1.2 Mon Apr 15 17:57:12 2002 +++ phpdoc/en/reference/pcre/reference.xml Thu Jun 13 03:55:02 2002 @@ -1,5 +1,5 @@ - + Regular Expression Functions (Perl-Compatible) PCRE @@ -58,10 +58,70 @@

Predefined constants - PREG_PATTERN_ORDER - PREG_SET_ORDER - PREG_SPLIT_NO_EMPTY - PREG_SPLIT_DELIM_CAPTURE + + 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. + + + + +
@@ -71,10 +131,10 @@ Examples of valid patterns - /<\/\w+>/ - |(\d{3})-\d+|Sm - /^(?i)php[34]/ - {^\s+(\s+)?$} + /<\/\w+>/ + |(\d{3})-\d+|Sm + /^(?i)php[34]/ + {^\s+(\s+)?$} @@ -84,17 +144,17 @@ - /href='(.*)' - missing ending delimiter + /href='(.*)' - missing ending delimiter - /\w+\s*\w+/J - unknown modifier 'J' + /\w+\s*\w+/J - unknown modifier 'J' - 1-\d3-\d3-\d4| - missing starting delimiter + 1-\d3-\d3-\d4| - missing starting delimiter Index: phpdoc/en/reference/pcre/functions/preg-match-all.xml diff -u phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.3 phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.4 --- phpdoc/en/reference/pcre/functions/preg-match-all.xml:1.3 Sun May 12 12:13:12 2002 +++ phpdoc/en/reference/pcre/functions/preg-match-all.xml Thu Jun 13 03:55:02 2002 @@ -1,5 +1,5 @@ - + @@ -13,7 +13,7 @@ stringpattern stringsubject arraymatches - intorder + intflags Searches subject for all matches to the regular @@ -26,7 +26,10 @@ on from end of the last match. - order can be one of two things: + flags can be a combination of the following flags + (note that it doesn't make sense to use + PREG_PATTERN_ORDER together with + PREG_SET_ORDER): PREG_PATTERN_ORDER @@ -94,11 +97,24 @@ + + PREG_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 every 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 . + + + - If order is not specified, it is assumed - to be PREG_PATTERN_ORDER. + If no order flag is given, PREG_PATTERN_ORDER is + assumed. Returns the number of full pattern matches (which might be zero), Index: phpdoc/en/reference/pcre/functions/preg-match.xml diff -u phpdoc/en/reference/pcre/functions/preg-match.xml:1.3 phpdoc/en/reference/pcre/functions/preg-match.xml:1.4 --- phpdoc/en/reference/pcre/functions/preg-match.xml:1.3 Sun May 12 12:13:12 2002 +++ phpdoc/en/reference/pcre/functions/preg-match.xml Thu Jun 13 03:55:02 2002 @@ -1,5 +1,5 @@ - + @@ -13,6 +13,7 @@ stringpattern stringsubject arraymatches + intflags Searches subject for a match to the regular @@ -24,6 +25,27 @@ matched the full pattern, $matches[1] will have the text that matched the first captured parenthesized subpattern, and so on. + + flags can be the following flag: + + + PREG_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 every 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 . + + + + + The flags parameter is available since + PHP 4.3.0 . + + preg_match returns the number of times pattern matches. That will be either 0 times Index: phpdoc/en/reference/pcre/functions/preg-split.xml diff -u phpdoc/en/reference/pcre/functions/preg-split.xml:1.3 phpdoc/en/reference/pcre/functions/preg-split.xml:1.4 --- phpdoc/en/reference/pcre/functions/preg-split.xml:1.3 Thu May 23 15:34:18 2002 +++ phpdoc/en/reference/pcre/functions/preg-split.xml Thu Jun 13 03:55:02 2002 @@ -1,5 +1,5 @@ - + @@ -63,10 +63,10 @@ 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 + value in an array where every 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 4.3.0. + This flag is available since PHP 4.3.0 .