22. What will be the output of the following Python code?
re.split('\W+', 'Hello, hello, hello.')
re.split('\W+', 'Hello, hello, hello.')23. . . . . . . . . matches the start of the string.
. . . . . . . . matches the end of the string.
. . . . . . . . matches the end of the string.
24. What is the output of the following code:
import re
result = re.search(r'd{2}', 'There are 25 apples and 3 oranges.')
print(result.group())
import re
result = re.search(r'd{2}', 'There are 25 apples and 3 oranges.')
print(result.group())25. What will be the output of the following Python code?
re.compile('hello', re.X)
re.compile('hello', re.X)26. What will be the output of the following Python code?
re.subn('A', 'X', 'AAAAAA', count=4)
re.subn('A', 'X', 'AAAAAA', count=4)27. What is the purpose of the re.findall() function in Python?
28. Which of the following functions clears the regular expression cache?
29. What will be the output of the following Python code?
re.split(r'\s+', 'Chrome is better than explorer', maxspilt=3)
re.split(r'\s+', 'Chrome is better than explorer', maxspilt=3)30. What will be the output of the following Python code?
import re
re.ASCII
import re
re.ASCII