Issue582618

classification
Title: Case insensitive re.match fails
Type: Severity: normal
Components: Library Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: bckfnn Nosy List: bckfnn
Priority: normal Keywords:

Created on 2002-07-17.04:06:57 by anonymous, last changed 2002-09-18.08:17:48 by bckfnn.

Messages
msg689 (view) Author: Nobody/Anonymous (nobody) Date: 2002-07-17.04:06:57
The code

import re
str = '<a><b>text</b></a>'
print re.match(r'^<([a-z]+)[^>]*>(.+)</\1>$', str).group(2)
print re.match(r'^<([a-z]+)[^>]*>(.+)</\1>$', str, re.I).group
(2)

prints

<b>text</b>
<b>text</b>

under CPython (which is correct) but under Jython it 
produces

<b>text</b>
text</b>
msg690 (view) Author: Finn Bock (bckfnn) Date: 2002-09-18.08:17:48
Logged In: YES 
user_id=4201

This bug is a duplicate of:
Fix for "[ 545235 ] unexpected match with re"

It already works in current CVS, fixed in SRE_STATE:1.9.
History
Date User Action Args
2002-07-17 04:06:57anonymouscreate