Замена без учета регистра

import re
pattern = re.compile("hello", re.IGNORECASE)
pattern.sub("bye", "hello HeLLo HELLO")
# 'bye bye bye'

string-manipulation

python

string

case-insensitive

2022-10-26T08:51:58+00:00