re — Regular expression operations
This module provides regular expression matching operations.
Constants
re.Iorre.IGNORECASE: Perform case-insensitive matchingre.Morre.MULTILINE: When specified, the pattern character '^' matches at the beginning of the string and at the beginning of each line (immediately following each newline); and the pattern character '$' matches at the end of the string and at the end of each line (immediately preceding each newline).
Functions
re.findallre.matchre.searchre.split
Class
re.MatchObject: match object support methodsgroupandgroups
For more information on how to use above attributes and methods, check Python's official documentation at re module - docs.python.org
Example
import re
m = re.match(r"(\w+) (\w+)", "Isaac Newton, physicist")
print m.group(0)
# Isaac Newton
print m.group(1)
# Isaac
print m.group(2)
# Newton