re.compile()

re.compile(pattern, flags=0)[source]

Compile a regular expression pattern, returning a pattern object.