What is the purpose of the re.IGNORECASE flag in Python?
A. It makes the pattern matching case-insensitive
B. It compiles a regular expression
C. It specifies a starting position
D. It ignores invalid characters
Answer: Option B
What is a regular expression in Python?
A. A sequence of characters that defines a search pattern
B. A built-in function
C. A mathematical expression
D. A special data type
What is the purpose of the re.compile() function in Python?
A. It compiles a regular expression pattern into a regular expression object
B. It converts strings to regular expressions
C. It defines a new class
D. It imports the re module
Which module in Python supports regular expressions?
A. re
B. regex
C. pyregex
D. none of the mentioned
How can you use regular expressions in Python?
A. By using the re module
B. By using the regex keyword
C. By including it as a string
D. By using the regx function
Join The Discussion