This module provides a way to search/replace a string by a pattern, known as Regular Expression or regex.
Python Regex Functions
For vast majority of uses, you want the
Python Regex Object ＆ Methods
For writing code using Object Oriented style.
Python Regex Flags
Options for regex methods that change regex pattern's meaning.
Python Regex Match Objects
Some function or method return their result as object called “MatchObject”.
Python Regex Syntax
Note: This document was originally a rewrite of Python 2.4's Official Documentation of its RE module (http://python.org/doc/2.4/lib/module-re.html), strictly following its style ＆ format. It was written in 2005. However, it has since been rewritten as independent tutorial ＆ reference. For detail, see: Notes on Rewriting Python Regex Documentation
For current official python doc on regex, see: