Labs / Computer Science

Regex NFA Matcher

Type a small regular expression and it is compiled — using Thompson's construction — into a nondeterministic finite automaton. Press play and follow the glowing set of active states as each character of the test string is read. A machine can be in many states at once, and the empty (ε) arrows let it quietly branch without reading anything.

Labs / Computer Science / Regex NFA Matcher

Computer Science20–30 minFoundation

Regex NFA Matcher

Type a small regular expression and it is compiled — using Thompson's construction — into a nondeterministic finite automaton. Press play and follow the glowing set of active states as each character of the test string is read. A machine can be in many states at once, and the empty (ε) arrows let it quietly branch without reading anything.

Why it matters

Why explore this?

Computer science turns clear rules into reliable processes. This model lets you step through those rules and see how each decision changes the result.