Skip to content

Std

io.text.engines.std.StdRegexEngine()

Bases: ScanEngine[S]

Engine that uses the Python standard library's regex engine.

compile(patterns)

Compile regex patterns to speed up searching.

This sets the _compiled attribute.

PARAMETER DESCRIPTION
patterns

Mapping an enum representing the states a file could be in to a list of regex patterns.

TYPE: dict[S, list[bytes]]

stream(buf)