re.IGNORECASE

Fredrik Lundh fredrik at pythonware.com
Tue Feb 27 15:20:29 EST 2001


"Bryan BZ" wrote:
> Why is it I want to ignore the case in my search but Python refuses to
> match:
>
> "Spam" with "spam"  OR
> "ni" with "Ni"

it's a bug in 2.0.  if the pattern contains uppercase
characters, IGNORECASE may not always work.

it's fixed in 2.1, and in the separate SRE distribution:
http://www.pythonware.com/products/sre/index.htm

Cheers /F

<!-- pythonworks 1.2 coming soon:
http://www.pythonware.com/products/works/index.htm
-->





More information about the Python-list mailing list