On Nov 26, 9:53 pm, Yann Le Boulanger <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a problem with regex , utf-8 chars and IGNORECASE > > >>> re.search(u'é', u'qwért', re.IGNORECASE) > <_sre.SRE_Match object at 0x2aaaaed0c100> > > Here everything is ok. > > >>> re.search(u'É', u'qwért', re.IGNORECASE) > > Here that doesn't work. but: > >>> print u'é'.upper() > É > > is it a bug in IGNORECASE option? >
... or poor documentation of a not-very-intuitive API? >>> re.search(u'\xc9', u'qw\xe9rt', re.IGNORECASE) >>> re.search(u'\xc9', u'qw\xe9rt', re.IGNORECASE + re.UNICODE) <_sre.SRE_Match object at 0x00DC14F0> >>> -- http://mail.python.org/mailman/listinfo/python-list