[Tutor] function to ignore case

Bob Gailer bgailer@alum.rpi.edu
Wed Jul 30 13:22:12 2003


--=======3CCC28C1=======
Content-Type: text/plain; x-avg-checked=avg-ok-6B4038B; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit

At 10:05 AM 7/30/2003 -0700, Matt Richardson wrote:

>Can someone point me to a function that will ignore case when searching 
>for a string?

If you are using re, specify the re.IGNORECASE option

If you are using find or one of its relatives, upcase the search-in string 
and the search-for string using the str upper method.

Bob Gailer
bgailer@alum.rpi.edu
303 442 2625

--=======3CCC28C1=======
Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-6B4038B
Content-Disposition: inline


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.500 / Virus Database: 298 - Release Date: 7/10/2003

--=======3CCC28C1=======--