ExamVeda
Login
Home
11
What does the function re.match do?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
12
What is the output of the following code:
import re
result = re.findall(r'bw+b', 'Hello, world!')
print(result)
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
13
What does the function re.search do?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
14
What is the output of the following code:
import re
result = re.search(r'hello', 'Hello, world!', re.IGNORECASE)
print(result.group())
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
15
How can you extract a group from a matched regular expression in Python?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
16
What is the purpose of the re.DOTALL flag in Python?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
17
What will be the output of the following code:
import re
pattern = re.compile(r'd+')
result = pattern.search('There are 5 apples and 3 oranges.')
print(result.group())
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
18
Which of the codes shown below results in a match?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
19
The function of re.search is . . . . . . . .
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
20
How can you match the beginning of a string using regular expressions?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board