python re.match case insensitive code example
Example 1: python string match ignore case
if firstStr.lower() == secStr.lower():
print('Both Strings are same')
else:
print('Strings are not same')
Example 2: python contains string case insensitive
>>> str = "Messi is the best SoCceR player"
>>> "soccer" in str.lower()
True
>>> "football" in str
False