हम search, match, या sub के flags पैरामीटर में re.IGNORECASE पास कर सकते हैं:
उदाहरण
import re
print(re.search('bush', 'BuSh', re.IGNORECASE))
print(re.match('bush', 'BuSh', re.IGNORECASE))
print(re.sub('bush', 'xxxx', 'Bushmeat', flags=re.IGNORECASE))
आउटपुट
<_sre.SRE_Match object at 0x0000000005316648> <_sre.SRE_Match object at 0x0000000005316648> xxxxmeat