Vidyalelo
Python · Q18

Regular Expressions in Python

Programming · Python · question 18

Q18

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')
Answer
D.
re.match('George(?=Washington)', 'Georgewashington')

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board