Which module in Python provides support for regular expressions?
Correct answer
A. re
16 views
A. re
16 views
The re module provides regular expression support in Python. Key functions include re.search(), re.match(), re.findall(), re.sub() and re.compile().
regex is a third-party package rather than part of the standard library, and the string module only holds constants and simple helpers.
Want more practice? Try the full set of Computer Science MCQs on MCQsExam.com.
Not sure why the answer is A? Ask here and get an explanation.