Skip to content

Playground

Any pattern, any inputs, nothing graded. The step count is the same one every task is scored on, so a pattern that looks expensive here is expensive everywhere.

//

Corpus

Steps12/ 10,000
Every input, what the pattern matched in it, and what each group captured
InputMatchSteps
(empty)3
(empty)3
(empty)3
(empty)3

Select an input to step through what the engine did to it.

Trace

Pick an input from the corpus and every step the engine takes on it appears here, forwards and backwards.

Inputs

One input per line. A blank line is an empty string, which is a real input and often the interesting one.

Both engines

Each input through the backtracking engine and through the automaton
InputBacktrackerAutomaton
ResultStepsResultSteps
[email protected]match3match1
o'[email protected]match3match1
not an addressmatch3match1
[email protected]match3match1

The two step counts are not the same unit — one counts instructions dispatched, the other states examined. What is comparable is how each one grows: add characters to the input and watch which column moves. The automaton has no captures, which is what it gave up to get there.