Reputation: 11282
Aside from using the Unicode mode (http://xahlee.org/perl-python/regex_split.html) in Python to search Chinese/Japanese characters, is it possible to still search for the said character in case insensitive or sensitive mode? (re.i)
I'm trying to understand why the following do not work:
mystring = 你是我
found = re.search(你是我, mystring, re.I)
found = re.search(你是我, mystring)
Upvotes: 0
Views: 1065
Reputation: 799082
Chinese and Japanese characters don't have a case, so they are unaffected by the case insensitivity flag. Make sure you are using unicode strings though.
Upvotes: 1