How to match a substring in a string, ignoring case
If you don't want to use str.lower()
, you can use a regular expression:
import reif re.search('mandy', 'Mandy Pande', re.IGNORECASE): # Is True
If you don't want to use str.lower()
, you can use a regular expression:
import reif re.search('mandy', 'Mandy Pande', re.IGNORECASE): # Is True