আমরা 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