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§
- Alphabet
Info - Information about the compressed byte alphabet used by a
Regex. - ExprRef
- An opaque handle that references an expression node inside an
ExprSet. - Json
Quote Options - 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.
- Regex
Builder - A builder for constructing
Regexinstances fromRegexAsttrees. - StateID
- An opaque identifier for a state in the lazily-constructed DFA.
Enums§
- Next
Byte - Describes the “next byte” information for a given
ExprReforStateID. - Regex
Ast - An AST node representing a regex pattern for use with
RegexBuilder.
Constants§
Functions§
Type Aliases§
- HashMap
- A
std::collections::HashMapusing the crate’sRandomStatehasher. - HashSet
- A
std::collections::HashSetusing the crate’sRandomStatehasher. - Random
State - The hash random state used throughout the crate.