Skip to main content

Crate derivre

Crate derivre 

Source
Expand description

A derivative-based regular expression engine.

The primary entry point is Regex for simple patterns, or RegexBuilder for constructing regexes programmatically from RegexAst trees.

Anchored matching. The engine only checks whether a regex matches the input from the beginning — there is an implied \A anchor. It does not search for matches within the input.

Lookahead. A single look-ahead at the end of the regex is supported via the A(?P<stop>B) syntax. See Regex::lookahead_len for details.

§References

Modules§

raw
Low-level building blocks for advanced use cases.

Structs§

AlphabetInfo
Information about the compressed byte alphabet used by a Regex.
ExprRef
An opaque handle that references an expression node inside an ExprSet.
JsonQuoteOptions
Options controlling how a regex is transformed to match inside a JSON-quoted string (e.g., converting literal newlines to \\n).
Regex
A compiled regular expression backed by a lazily-constructed DFA.
RegexBuilder
A builder for constructing Regex instances from RegexAst trees.
StateID
An opaque identifier for a state in the lazily-constructed DFA.

Enums§

NextByte
Describes the “next byte” information for a given ExprRef or StateID.
RegexAst
An AST node representing a regex pattern for use with RegexBuilder.

Constants§

VERSION

Functions§

map_ast

Type Aliases§

HashMap
A std::collections::HashMap using the crate’s RandomState hasher.
HashSet
A std::collections::HashSet using the crate’s RandomState hasher.
RandomState
The hash random state used throughout the crate.