diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2001-01-15 18:28:14 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2001-01-15 18:28:14 (GMT) |
commit | 2e24044f9db23c3d2195a129f53f2deb73a4e4af (patch) | |
tree | de28bfff15ec4e425623b183af044396d025dd4b /Lib/sre_compile.py | |
parent | 48450cf0a94765c010eddfbbfc5c85380e6a9a15 (diff) | |
download | cpython-2e24044f9db23c3d2195a129f53f2deb73a4e4af.zip cpython-2e24044f9db23c3d2195a129f53f2deb73a4e4af.tar.gz cpython-2e24044f9db23c3d2195a129f53f2deb73a4e4af.tar.bz2 |
from the really-stupid-bug department: uppercase literals should match
uppercase strings also when the IGNORECASE flag is set (bug #128899)
(also added test cases for recently fixed bugs to the regression suite
-- or in other words, check in re_tests.py too...)
Diffstat (limited to 'Lib/sre_compile.py')
-rw-r--r-- | Lib/sre_compile.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py index c2996fc..ab2a2cc 100644 --- a/Lib/sre_compile.py +++ b/Lib/sre_compile.py @@ -23,9 +23,10 @@ def _compile(code, pattern, flags): if op in (LITERAL, NOT_LITERAL): if flags & SRE_FLAG_IGNORECASE: emit(OPCODES[OP_IGNORE[op]]) + emit(_sre.getlower(av, flags)) else: emit(OPCODES[op]) - emit(av) + emit(av) elif op is IN: if flags & SRE_FLAG_IGNORECASE: emit(OPCODES[OP_IGNORE[op]]) |