my.regex.meta: Internal Regex Metatypes#
This subpackage contains a variety of classes (and a few constants!) for representing, analyzing,
and modifying regular expressions in a structured manner. As opposed to the internal types within
Python’s standard re library, these types are not built to support regex evaluation; instead,
they provide a more modern, ergonomic way to work with regular expressions before they’re
evaluated.
These modules are described as “internal” because they were clearly designed with the specific
needs of RegexStore in mind–namely, optimizing branching expressions (e.g. a|b) and debugging
complex expressions of any kind–but they are made available in the public API nonetheless. If you
extend them, please consider submitting a PR so that others can benefit from your work!
Tree: A Branching Regular ExpressionRegex: A Parsed Regular ExpressionAtom: A Single Regex ElementGroupAtom: A Regex GroupSetAtom: A Regex Character SetQuantifier: The Final Part of a Regex AtomGroupKind: Enumeration of Regex Group TypesParseData: An Internal Register for Manipulating Regex MatchesMETA_RGXS: Patterns for Parsing Patterns