Examveda

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')

Answer: Option C


This Question Belongs to Python Program >> Regular Expressions In Python

Join The Discussion

Related Questions on Regular Expressions in Python