I’m a little stuck on this one, and I’m sure it’s actually very easy to do…but I am missing something.
Basically I need to check for a string, but without case sensitive:
string input = "Track 01";
if( input == "track 01")
{
//do something
}
right now the above if statement returns false, because I should be looking for a capital “T”. What i want to do is make the above if statement return true whether the input is “Track 01” or “track 01”, or even better, “track01”.
I looked at the Regex class on the MSN library but I’m a little confused as to how I would use it in my scenario? I guess I don’t really understand the tutorials on the use of the Regex class.
I have also read that “(?i)” before the string is the same as using RegexOptions.IgnoreCase flag, but again, I couldn’t make it work.
Any help would be greatly appreciated!
Thanks