Text search that's not case sensitive

I’m making a glossary. The glossary terms and definitions are in an xml file. I have read the terms (the words to be defined) into an array. I have included a search field, such that when I enter a term in the search field, a function loops through the array of terms and if the string I entered in the search field matches an item in the array, Flash traces out “match” (in this early part of coding).

Here is my problem: If one of the terms in the glossary is “India Pale Ale”, with capital letters, then a search on “india pale ale” turns up no matches.

How do I remove case sensitivity in this scenario?