Module regex

Source
Expand description

Regular expressions.

Structs§

Regex
A hashable, comparable, and serializable regular expression type.

Enums§

RegexCompilationError
Error type for regex compilation failures.

Constants§

MAX_REGEX_SIZE_AFTER_COMPILATION 🔒
The maximum size of a regex after compilation. This is the same as the Regex crate’s default at the time of writing.
MAX_REGEX_SIZE_BEFORE_COMPILATION 🔒
We also need a separate limit for the size of regexes before compilation. Even though the Regex crate promises that using its size_limit option (which we set to the other limit, MAX_REGEX_SIZE_AFTER_COMPILATION) would prevent excessive resource usage, this doesn’t seem to be the case. Since we compile regexes in envd, we need strict limits to prevent envd OOMs. See https://github.com/MaterializeInc/database-issues/issues/9907 for an example.