structa.chars
The structa.chars
module provides classes and constants for defining and manipulating character classes (in the sense of regular expressions). The primary class of interest is CharClass
, but most uses can likely be covered by the set of constants defined in the module.
CharClass
AnyChar
char_range
oct_digit
Represents any valid digit in base 8 (octal).
dec_digit
Represents any valid digit in base 10 (decimal).
hex_digit
Represents any valid digit in base 16 (hexidecimal).
ident_first
Represents any character which is valid as the first character of a Python identifier.
ident_char
Represents any character which is valid within a Python identifier.
any_char
Represents any valid character (an instance of AnyChar
).