case-sensitive regEx

Hello,
I use inmy program the following code connected with regular expression::

public List<EntryWithID> ReturnMatchingEntries(Regex filter)
{
List<EntryWithID> tempEntries = new List<EntryWithID>();
if (filter == null)
{
for (int i = 0; i < this.EntriesList.Count; i++)
{
tempEntries.Add(new EntryWithID(EntriesList[i].PolishEntry, EntriesList[i].ID));
tempEntries.Add(new EntryWithID(EntriesList[i].EnglishEntry, EntriesList[i].ID));
tempEntries.Add(new EntryWithID(EntriesList[i].GermanEntry, EntriesList[i].ID));
}
return tempEntries;
}
else
{
for (int j = 0; j < EntriesList.Count; j++)
{
if (filter.IsMatch(EntriesList[j].PolishEntry))
{
tempEntries.Add( new EntryWithID( EntriesList[j].PolishEntry, EntriesList[j].ID));
}
if (filter.IsMatch(EntriesList[j].EnglishEntry))
{
tempEntries.Add(new EntryWithID( EntriesList[j].EnglishEntry, EntriesList[j].ID));
}
if (filter.IsMatch(EntriesList[j].GermanEntry))
{
tempEntries.Add(new EntryWithID( EntriesList[j].GermanEntry, EntriesList[j].ID));
}
}
return tempEntries;

}

}

List<EntryWithID> entries = dal.ReturnMatchingEntries(new Regex(tbSearch.Text));
dgvEntries.Rows.Clear();
for (int i = 0; i < entries.Count; i++)
{
dgvEntries.Rows.Add(entries[i].Entry, entries[i].EntryID);
}

And the 'filter' in the code above is case-sensitive. I would like to know if it is possible to use it in way not to be case-sensitive.

Thank You in advance for your help!!!!
[2201 byte] By [dzonka] at [2007-11-20 11:44:08]
# 1 Re: case-sensitive regEx
there are several options. the easiest would be to create your regex w/ the IgnoreCase RegexOption.
MadHatter at 2007-11-9 11:37:06 >
# 2 Re: case-sensitive regEx
Thanks a lot, but could you give me some more details, because I 'm dealing with this topic for the first time :).
dzonka at 2007-11-9 11:38:06 >
# 3 Re: case-sensitive regEx
List<EntryWithID> entries = dal.ReturnMatchingEntries(new Regex(tbSearch.Text, RegexOptions.IgnoreCase));
MadHatter at 2007-11-9 11:39:05 >
# 4 Re: case-sensitive regEx
Great!! Thanks a lot:)
dzonka at 2007-11-9 11:39:59 >