From 082b624991fbb664279bad4ec1aa55171e4e55e3 Mon Sep 17 00:00:00 2001 From: "Daniel P. Brown" Date: Fri, 13 Mar 2009 16:05:09 +0000 Subject: [PATCH] Updated to show that, yes, 'caseless' and 'case-insensitive' are the same thing. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@277112 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/pcre/pattern.syntax.xml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/reference/pcre/pattern.syntax.xml b/reference/pcre/pattern.syntax.xml index 64836254d1..01fecae76f 100644 --- a/reference/pcre/pattern.syntax.xml +++ b/reference/pcre/pattern.syntax.xml @@ -1,5 +1,5 @@ - + Pattern Syntax @@ -580,7 +580,7 @@ supported by PCRE. - Specifying caseless matching does not affect these escape sequences. + Specifying case-insensitive (caseless) matching does not affect these escape sequences. For example, \p{Lu} always matches only upper case letters. @@ -713,11 +713,11 @@ the string. - When caseless matching is set, any letters in a class - represent both their upper case and lower case versions, so - for example, a caseless [aeiou] matches "A" as well as "a", - and a caseless [^aeiou] does not match "A", whereas a - caseful version would. + When case-insensitive (caseless) matching is set, any letters + in a class represent both their upper case and lower case + versions, so for example, an insensitive [aeiou] matches "A" + as well as "a", and an insensitive [^aeiou] does not match + "A", whereas a sensitive (caseful) version would. The newline character is never treated in any special way in @@ -750,11 +750,11 @@ Ranges operate in ASCII collating sequence. They can also be used for characters specified numerically, for example [\000-\037]. If a range that includes letters is used when - caseless matching is set, it matches the letters in either - case. For example, [W-c] is equivalent to [][\^_`wxyzabc], - matched caselessly, and if character tables for the "fr" - locale are in use, [\xc8-\xcb] matches accented E characters - in both cases. + case-insensitive (caseless) matching is set, it matches the + letters in either case. For example, [W-c] is equivalent to + [][\^_`wxyzabc], matched case-insensitively, and if character + tables for the "fr" locale are in use, [\xc8-\xcb] matches + accented E characters in both cases. The character types \d, \D, \s, \S, \w, and \W may also @@ -842,7 +842,7 @@ - For example, (?im) sets caseless, multiline matching. It is + For example, (?im) sets case-insensitive (caseless), multiline matching. It is also possible to unset these options by preceding the letter with a hyphen, and a combined setting and unsetting such as (?im-sx), which sets (sens|respons)e and \1ibility matches "sense and sensibility" and "response and responsibility", - but not "sense and responsibility". If caseful + but not "sense and responsibility". If case-sensitive (caseful) matching is in force at the time of the back reference, then the case of letters is relevant. For example, ((?i)rah)\s+\1 matches "rah rah" and "RAH RAH", but not "RAH rah", even - though the original capturing subpattern is matched caselessly. + though the original capturing subpattern is matched + case-insensitively (caselessly). There may be more than one back reference to the same subpattern.