re is a standard Python library that's used to deal with Regex. Every default Python installation contains the re library. If the library doesn't exist, please refer to Chapter 2, Python and the Web – Using urllib and Requests, the Setting things up section, to learn how to set it up.
Let's begin by importing re using the Python IDE and listing its properties using the dir() function:
>>> import re>>> print(dir(re)) #listing features from re
The following is the output of the preceding command:
['A', 'ASCII', 'DEBUG', 'DOTALL', 'I', 'IGNORECASE', 'L', 'LOCALE', 'M', 'MULTILINE', ...