NEW
Font size
S
M
L
XL
WorksheetsRegular Expressions (Python)
Total questions: 7
Worksheet time: 4mins
Name
Class
Date
1.
What is line of Python code imports the re module?
a)
Import re
b)
import RE
c)
import re
d)
Import RE
2.
Which flag will make your search case-insensitive?
a)
re.I
b)
re.c-i
c)
re.CI
d)
re.C-I
3.
_______ is used to search through a string starting at its beginning. It returns None if no match is found.
a)
re.match()
b)
re.Search()
c)
re.Method()
d)
re.search()
4.
Which flag will search over multiple lines?
a)
re.ml
b)
re.M
c)
re.m
d)
re.ML
5.
_______ searches the entire string, not just starting at the beginning. It returns None if no match is found.
a)
re.match()
b)
re.Search()
c)
re.Method()
d)
re.search()
6.
Will this code match the regular expression?
a)
Yes
b)
No
7.
Will this code match the regular expression?
a)
Yes
b)
No
Reset
