Regex Becomes a 3D Marble Run You Can Watch

Regex visualized as 3D marble run

Regex Becomes a 3D Marble Run You Can Watch

A web project turns JavaScript regular expressions into a 3D marble run, where each piece of the pattern becomes a physical track segment. The example layout breaks down a simple pattern into 42 pieces and 41 edges, complete with gates and a greedy loop. You can enter your own pattern and test string, with support for the u and v flags.

The 3D view could not be opened. The layout is shown below.
  1. seizethecheese

    My coworker used to teach non-technical people how to code. Students always found regex hard to understand.

    Let's be honest, regex can be hard to understand even for technical people. (At least it's hard for me.)

    So coworker built this to help anyone understand arbitrary regex commands.

    AI disclosure: this was built using Agent Duel, a local coding agent arena system (https://github.com/bottomless/agent-duel). Promotion disclosure: our company is building agent duel. To test it and find bugs we are building passion projects through the system. I nonetheless thought HN would find this interesting.

  2. hollow-moe

    what was that big cloudflare outage regex again ?

  3. monster_truck

    This is actually pretty satisfying, I wish it had sound. Maybe a dramatic follow cam for the balls

  4. fwlr

    Seems the input text box is limited to 301 characters.

  5. Sarkie

    Now I have 3 problems

More from this day

2026-10-18