]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Clarified meaning of \w and \W with respect to the UNICODE and LOCALE flags.
authorFred Drake <fdrake@acm.org>
Tue, 12 Nov 2002 23:13:40 +0000 (23:13 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 12 Nov 2002 23:13:40 +0000 (23:13 +0000)
Closes SF bug #635595.

Doc/lib/libre.tex

index ab94c48ed3a4ea5cc05c6f215d94726d3eb33d0c..732f033bf69579f484059d083e3a137dbace8c9b 100644 (file)
@@ -356,10 +356,10 @@ equivalent to the set \regexp{[ \e t\e n\e r\e f\e v]}.
 equivalent to the set \regexp{[\textasciicircum\ \e t\e n\e r\e f\e v]}.
 
 \item[\code{\e w}]When the \constant{LOCALE} and \constant{UNICODE}
-flags are not specified,
-matches any alphanumeric character; this is equivalent to the set
+flags are not specified, matches any alphanumeric character and the
+underscore; this is equivalent to the set
 \regexp{[a-zA-Z0-9_]}.  With \constant{LOCALE}, it will match the set
-\regexp{[0-9_]} plus whatever characters are defined as letters for
+\regexp{[0-9_]} plus whatever characters are defined as alphanumeric for
 the current locale.  If \constant{UNICODE} is set, this will match the
 characters \regexp{[0-9_]} plus whatever is classified as alphanumeric
 in the Unicode character properties database.
@@ -368,9 +368,9 @@ in the Unicode character properties database.
 flags are not specified, matches any non-alphanumeric character; this
 is equivalent to the set \regexp{[{\textasciicircum}a-zA-Z0-9_]}.   With
 \constant{LOCALE}, it will match any character not in the set
-\regexp{[0-9_]}, and not defined as a letter for the current locale.
+\regexp{[0-9_]}, and not defined as alphanumeric for the current locale.
 If \constant{UNICODE} is set, this will match anything other than
-\regexp{[0-9_]} and characters marked at alphanumeric in the Unicode
+\regexp{[0-9_]} and characters marked as alphanumeric in the Unicode
 character properties database.
 
 \item[\code{\e Z}]Matches only at the end of the string.