I have these inputs:
s1 = 'I am using c++ programming'.
s2 = = 'I am usingc++ programming'.
I want to check if s1 or s2 contains the exact word c++
.
running this regex on both s1 and s2, it does not give any output:
x=s1 #x=s2
if re.search(r'\bc\+\+\b', x):
print(x)
expected result: detect c++ in s1