re regular match, search, findall, finditer function method usage

match

Matches the beginning of the string, returns a Match object if successful, returns None if it fails, and only matches one.

Search in the string, return a Match object on success, None on failure, and only match one.

findall

Finds all  successfully matched groups in string, i.e. the part enclosed in parentheses. Returns a list object, each list item is a list of all groups for each match.

splitter

Find all  matching strings in string, return iterator, each item is a Match object.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324779567&siteId=291194637