Railroad Diagram
Under More in the workbench, the Railroad tab renders a syntax railroad diagram for the current pattern (when it parses successfully). It complements the Structure tab’s AST tree: the diagram emphasizes alternation, repetition, and grouping in a familiar visual grammar.
When to use it
- Compare alternative shapes (
|) and nested groups at a glance. - Teach or document a pattern for teammates who prefer diagrams over trees.
- Sanity-check that quantifiers and anchors look like you expect.
Limitations
- Diagrams reflect the parsed pattern; invalid regex shows parse errors instead.
- Extremely large patterns may be harder to navigate; collapse or simplify in the AST view if needed.