Match#
- class Match(group, match_str, start, end)#
Bases:
objectMatch extract from a filename.
- classmethod from_match(group, match, idx)#
Return Match object from a re.Match object.
- get_match(parse=True, raise_on_unparsed=True)#
Get match string or value.
- Parameters:
- Raises:
ValueError – Could not parse the match.
- Return type:
- property match_parsed: Any | Sentinel#
Return value or Sentinel value if failing to parse.
Returns
PARSE_FAILif an exception is thrown when trying to parse the match.