Hi Forum Members,
I am trying to write a code using regular expression using ?. However, I am unable to understand why my given string doesn't match as expected
when searched using re.search(pattern, s3), re.search(pattern, s4)
It works fine, but it doesn't work with s1 and s2. I cannot understand why, as ? means occurrence of preceding characters once. Here those characters can be anything between c o l d.
On the contrary it matched l d ONLY