icalendar.parser.xcal.match module#
Consistent error reporting and matching of xCal element content.
- class icalendar.parser.xcal.match.XCalRegexMatcher(regex, expected_message, flags=0)[source]#
Bases:
objectMatch a regex and provide consistent error messages.
- Parameters:
- groups(element)[source]#
Return the match groups for the element's text.
- Parameters:
element (
ElementAdapter) – The element to match the text from.- Return type:
- Returns:
The groups of the match if successful.
- Raises:
XCalParsingError – If the provided xCal is invalid.
- match(element)[source]#
Return the match for the element's text.
- Parameters:
element (
ElementAdapter) – The element to match the text from.- Return type:
- Returns:
The match if successful.
- Raises:
XCalParsingError – If the provided xCal is invalid.