How to match a substring in a string ignoring case in Python

1 Answer

0 votes
import re

s = "PYTHON C C++ PHP C#"

import re

if re.search('python', s, re.IGNORECASE):
    print("Match")
else:
    print("Not math")


  
'''
run:
    
Match

'''

 



answered Sep 30, 2022 by avibootz
...