diff options
author | 1997-12-10 23:05:53 +0000 | |
---|---|---|
committer | 1997-12-10 23:05:53 +0000 | |
commit | bd49ac44925fe350b1f4f61cabcdb3f2e5cd2ff8 (patch) | |
tree | 962c0c8cfbbd1b6e31fb33a91b227c50444da362 | |
parent | At Barry's suggestion, plug the security leak by using an empty (diff) | |
download | cpython-bd49ac44925fe350b1f4f61cabcdb3f2e5cd2ff8.tar.gz cpython-bd49ac44925fe350b1f4f61cabcdb3f2e5cd2ff8.tar.bz2 cpython-bd49ac44925fe350b1f4f61cabcdb3f2e5cd2ff8.zip |
The 'l' flag (locale specific matching) has been renamed to 'L'.
-rw-r--r-- | Doc/lib/libre.tex | 5 | ||||
-rw-r--r-- | Doc/libre.tex | 5 | ||||
-rw-r--r-- | Modules/pypcre.c | 4 |
3 files changed, 8 insertions, 6 deletions
diff --git a/Doc/lib/libre.tex b/Doc/lib/libre.tex index 6f216a78e08..b63a5fac19b 100644 --- a/Doc/lib/libre.tex +++ b/Doc/lib/libre.tex @@ -164,10 +164,11 @@ class: \code{[(] [)]}. determines what the meaning and further syntax of the construct is. Following are the currently supported extensions. % -\item[\code{(?ilmsx)}] (One or more letters from the set 'i', 'l', 'm', 's', +\item[\code{(?iLmsx)}] (One or more letters from the set 'i', 'L', 'm', 's', 'x'.) The group matches the empty string; the letters set the corresponding flags (re.I, re.L, re.M, re.S, re.X) for the entire regular -expression. This is useful if you wish include the flags as part of the regular +expression. (The flag 'L' is uppercase because it is not in standard Perl.) +This is useful if you wish include the flags as part of the regular expression, instead of passing a \var{flag} argument to the \code{compile} function. % \item[\code{(?:...)}] A non-grouping version of regular parentheses. diff --git a/Doc/libre.tex b/Doc/libre.tex index 6f216a78e08..b63a5fac19b 100644 --- a/Doc/libre.tex +++ b/Doc/libre.tex @@ -164,10 +164,11 @@ class: \code{[(] [)]}. determines what the meaning and further syntax of the construct is. Following are the currently supported extensions. % -\item[\code{(?ilmsx)}] (One or more letters from the set 'i', 'l', 'm', 's', +\item[\code{(?iLmsx)}] (One or more letters from the set 'i', 'L', 'm', 's', 'x'.) The group matches the empty string; the letters set the corresponding flags (re.I, re.L, re.M, re.S, re.X) for the entire regular -expression. This is useful if you wish include the flags as part of the regular +expression. (The flag 'L' is uppercase because it is not in standard Perl.) +This is useful if you wish include the flags as part of the regular expression, instead of passing a \var{flag} argument to the \code{compile} function. % \item[\code{(?:...)}] A non-grouping version of regular parentheses. diff --git a/Modules/pypcre.c b/Modules/pypcre.c index 5d41cc14b84..797d955b397 100644 --- a/Modules/pypcre.c +++ b/Modules/pypcre.c @@ -1755,7 +1755,7 @@ for (;; ptr++) { case '#': case 'i': - case 'l': + case 'L': case 'm': case 's': case 'x': @@ -2476,7 +2476,7 @@ while ((c = *(++ptr)) != 0) options |= PCRE_CASELESS; continue; } - else if ((c = *ptr) == 'l') + else if ((c = *ptr) == 'L') { options |= PCRE_LOCALE; continue; |