PythonRegEx Functions
RegEx Functions
There
module offers a set of functions that allows us to search a string for a match:
Function | Description |
---|---|
findall | Returns a list containing all matches |
search | Returns aMatch object if there is a match anywhere in the string |
split | Returns a list where the string has been split at each match |
sub | Replaces one or many matches with a string |
Related Pages
Python RegEx TutorialRegExMetacharacters in RegExRegEx Special SequencesRegEx SetsRegEx Match Object