Module regex_automata::dfa::regex

source ·
Expand description

A DFA-backed Regex.

This module provides Regex, which is defined generically over the Automaton trait. A Regex implements convenience routines you might have come to expect, such as finding the start/end of a match and iterating over all non-overlapping matches. This Regex type is limited in its capabilities to what a DFA can provide. Therefore, APIs involving capturing groups, for example, are not provided.

Internally, a Regex is composed of two DFAs. One is a “forward” DFA that finds the end offset of a match, where as the other is a “reverse” DFA that find the start offset of a match.

See the parent module for examples.

Structs

  • A builder for a regex based on deterministic finite automatons.
  • An iterator over all non-overlapping matches for an infallible search.
  • A regular expression that uses deterministic finite automata for fast searching.