The RegExp Library


The RegExp Library …​


Using the RegExp Library

A tutorial guide to using this library.


Defines the interface to a parser for a concrete regular-expression syntax.


Defines the interface to a regular-expression search engine.

structure RegExpSyntax

Defines the abstract syntax of regular expressions.

structure MatchTree

Provides a tree-structured representation of the result of a successful regular expression match.

structure AwkSyntax

A parser for the regular-expression syntax defined by the AWK language.

structure BackTrackEngine

A regular-expression search engine implemented as a back-tracking interpreter.

structure DfaEngine

A regular-expression search engine implemented as a deterministic finite automata.

structure ThompsonEngine

A regular-expression search engine based on Ken Thompson’s design.

functor RegExpFn

Provides a functor for combining a regular-expression parser with an engine to form a complete implementation of an regular-expression search module.


For SML/NJ, include $/ in your CM file.

For use in MLton, include $(SML_LIB)/smlnj-lib/RegExp/ in your MLB file.