Skip to main content

count_character_classes

Function count_character_classes 

Source
fn count_character_classes(pattern: &str) -> Option<usize>
Expand description

Counts the character classes in pattern, or None if it does not parse.

Not an escape hatch: an unparseable pattern is left to RegexBuilder, and both parse through the same regex-syntax with the same configuration (nest_limit 250, octal off), so a pattern that fails here fails there too.