Quiz Yourself on Regular Expressions

Test yourself on regular expressions with Python.

Quiz

1

What does this “D” escape code help with?

import re
text = 'Python201'
match = re.findall(r'\D', text)
print(match)
A)

Prints all the matching characters

B)

Prints the matching non-digit

C)

Finds out the matching regular expression

D)

Matches whitespace

Question 1 of 40 attempted

Get hands-on with 1200+ tech skills courses.