Case insensitive regular expression without re.compile?

In Python, I can compile a regular expression to be case-insensitive using re.compile: >>> s=”TeSt” >>> casesensitive = re.compile(‘test’) >>> ignorecase = re.compile(‘test’, re.IGNORECASE) >>> >>> print casesensitive.match(s) None >>> print ignorecase.match(s) <_sre.SRE_Match object at 0x02F0B608> Is there a way to do the same, but without using re.compile. I can’t find anything like Perl’s i … Read more

Case insensitive ‘Contains(string)’

Is there a way to make the following return true? string title = “ASTRINGTOTEST”; title.Contains(“string”); There doesn’t seem to be an overload that allows me to set the case sensitivity. Currently I UPPERCASE them both, but that’s just silly (by which I am referring to the i18n issues that come with up- and down casing). … Read more