re.IGNORECASE
Timothy Grant
tjg at exceptionalminds.com
Tue Feb 27 17:29:51 EST 2001
On Tue, Feb 27, 2001 at 03:00:43PM -0500, 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"
>
> For example (a really silly and stupid one) ...
>
> searchresult = re.search("Monty Python", "monty Python", re.IGNORECASE)
> won't match...
>>> import re
>>> searchresult = re.search("Monty Python", "monty Python",
>>> re.IGNORECASE)
>>> print searchresult
<re.MatchObject instance at 80b1808>
Worked for me.
--
Stand Fast,
tjg.
Timothy Grant tjg at exceptionalminds.com
Red Hat Certified Engineer www.exceptionalminds.com
Avalon Technology Group, Inc. <>< (503) 246-3630
>>>>>>>>>>>>>Linux, because rebooting is *NOT* normal<<<<<<<<<
>>>>This machine was last rebooted: 42 days 2:42 hours ago<<
More information about the Python-list
mailing list