From 5b5e1f4a4bfdf92eab85c0e12f292340d138519b Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Tue, 4 Dec 2001 17:56:31 +0000 Subject: [PATCH] No need to explicitly specify list numbers and letters here. They are implicit using the ... git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@63868 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/pcre.xml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/functions/pcre.xml b/functions/pcre.xml index f1a764f775..ce3386d561 100644 --- a/functions/pcre.xml +++ b/functions/pcre.xml @@ -1,5 +1,5 @@ - + Regular Expression Functions (Perl-Compatible) PCRE @@ -947,7 +947,7 @@ $fl_array = preg_grep ("/^(\d+)?\.\d+$/", $array); - 3. Capturing subpatterns that occur inside negative looka- + Capturing subpatterns that occur inside negative looka- head assertions are counted, but their entries in the offsets vector are never set. Perl sets its numerical vari- ables from any such patterns that are matched before the @@ -958,7 +958,7 @@ $fl_array = preg_grep ("/^(\d+)?\.\d+$/", $array); - 4. Though binary zero characters are supported in the sub- + Though binary zero characters are supported in the sub- ject string, they are not allowed in a pattern string because it is passed as a normal C string, terminated by zero. The escape sequence "\0" can be used in the pattern to @@ -967,7 +967,7 @@ $fl_array = preg_grep ("/^(\d+)?\.\d+$/", $array); - 5. The following Perl escape sequences are not supported: + The following Perl escape sequences are not supported: \l, \u, \L, \U, \E, \Q. In fact these are implemented by Perl's general string-handling and are not part of its pat- tern matching engine. @@ -975,19 +975,19 @@ $fl_array = preg_grep ("/^(\d+)?\.\d+$/", $array); - 6. The Perl \G assertion is not supported as it is not + The Perl \G assertion is not supported as it is not relevant to single pattern matches. - 7. Fairly obviously, PCRE does not support the (?{code}) + Fairly obviously, PCRE does not support the (?{code}) construction. - 8. There are at the time of writing some oddities in Perl + There are at the time of writing some oddities in Perl 5.005_02 concerned with the settings of captured strings when part of a pattern is repeated. For example, matching "aba" against the pattern /^(a(b)?)+$/ sets $2 to the value @@ -1001,7 +1001,7 @@ $fl_array = preg_grep ("/^(\d+)?\.\d+$/", $array); - 9. Another as yet unresolved discrepancy is that in Perl + Another as yet unresolved discrepancy is that in Perl 5.005_02 the pattern /^(a)?(?(1)a|b)+$/ matches the string "a", whereas in PCRE it does not. However, in both Perl and PCRE /^(a)?a/ matched against "a" leaves $1 unset. @@ -1009,12 +1009,12 @@ $fl_array = preg_grep ("/^(\d+)?\.\d+$/", $array); - 10. PCRE provides some extensions to the Perl regular + PCRE provides some extensions to the Perl regular expression facilities: - (a) Although lookbehind assertions must match fixed length + Although lookbehind assertions must match fixed length strings, each alternative branch of a lookbehind assertion can match a different length of string. Perl 5.005 requires them all to have the same length. @@ -1022,7 +1022,7 @@ $fl_array = preg_grep ("/^(\d+)?\.\d+$/", $array); - (b) If PCRE_DOLLAR_ENDONLY is set and + If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is not set, the $ meta- character matches only at the very end of the string. @@ -1030,13 +1030,13 @@ $fl_array = preg_grep ("/^(\d+)?\.\d+$/", $array); - (c) If PCRE_EXTRA is set, a backslash followed by a letter + If PCRE_EXTRA is set, a backslash followed by a letter with no special meaning is faulted. - (d) If PCRE_UNGREEDY is set, the greediness of the repeti- + If PCRE_UNGREEDY is set, the greediness of the repeti- tion quantifiers is inverted, that is, by default they are not greedy, but if followed by a question mark they are.