Answers for "case insensitive replace python"

0

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'
Posted by: Guest on August-10-2020

Python Answers by Framework

Browse Popular Code Answers by Language