Which of the codes shown below results in a match?
(a) re.match(‘George(?=Washington)’, ‘George Washington’)
(b) re.match(‘George(?=Washington)’, ‘George’)
(c) re.match(‘George(?=Washington)’, ‘GeorgeWashington’)
(d) re.match(‘George(?=Washington)’, ‘Georgewashington’)
I had been asked this question in my homework.
This intriguing question originated from Regular Expressions topic in chapter Regular Expressions and Files of Python