2.
What is the purpose of the re.compile() function in Python?

5.
What does the match() function in the re module do?

6.
What does the findall() function in the re module do?

7.
What is the purpose of the re.IGNORECASE flag in Python?

8.
What is the output of the following code:
import re
result = re.sub(r'd+', 'number', 'There are 5 apples and 3 oranges.')
print(result)

9.
How can you search for a specific pattern in a string using regular expressions in Python?