python re case insensitive code example
Example 1: how to make a string case insensitive in python
if thing.lower() == "text":
Example 2: case insensitive replace python
>>> import re
>>> insensitive_hippo = re.compile(re.escape('hippo'), re.IGNORECASE)
>>> insensitive_hippo.sub('giraffe', 'I want a hIPpo for my birthday')
'I want a giraffe for my birthday'