digtools
🚂
regex visualizer,

Regex-visualisatie

Visualiseer regex met Railroad Diagram.Ook realtime weergave van matchresultaten met testtekst.

🚂
Railroad Diagram
Visualize regex structure as a flowchart
Live Matching
See match results update in real time
🔒
Fully Local
Regex and test strings never sent to server
/ /

🔒Regex and test strings are never sent to any server. * Note: Railroad Diagram uses Regulex (CDN).

about,

About

A developer tool that renders regular expressions as Railroad Diagrams (syntax diagrams) and displays live match results. The existing regex-checker only supports pattern testing. This tool is specifically designed for visualizing regex structure — a completely separate feature.

how to,

How to Use

STEP 1

Enter a Regex

Type a pattern and set flags. Try the example buttons to get started.

STEP 2

Read the Diagram

The Railroad Diagram visualizes the regex structure as a path flow.

STEP 3

Test & Export

Enter a test string to see live matches, then export the SVG diagram.

glossary,

Glossary

Regular Expression (Regex)
A formal language for describing text patterns. In JavaScript, written as /pattern/flags.
Railroad Diagram
A visual representation of syntax/grammar. Shows branching, repetition, and sequence as a directed path.
Capture Group
Parentheses () that capture matched text for backreference or replacement via $1, $2, etc.
Quantifier
Specifies repetition: * (0+), + (1+), ? (0 or 1), {n,m} (n to m times).
Character Class
[ ] matches any listed character. [a-z] = lowercase, [^0-9] = non-digit.
Lookahead / Lookbehind
(?=...) and (?<=...) assert conditions ahead/behind the match without consuming characters.
Flags (g/i/m/s/u)
g=global, i=case-insensitive, m=multiline, s=dotAll, u=Unicode mode.
faq,

FAQ

Q.How is this different from regex-checker?
regex-checker focuses on testing and match display. This tool's main feature is Railroad Diagram visualization.
Q.Which regex syntax is supported?
ES2024 JavaScript regex syntax, including lookahead, lookbehind, and named capture groups.
Q.Is my data sent to a server?
No. All processing is local in your browser.
Q.Are there ReDoS risks?
Catastrophically backtracking patterns could slow the browser. Test with small strings first.
Q.Does it require internet?
The Railroad Diagram library loads from CDN. The match testing feature works offline.
use cases,

Use Cases

📚

Learning Regex

Understand complex patterns visually by seeing the structure as a diagram.

🐛

Debugging Patterns

Verify a pattern is structured as intended before using it in production code.

👨‍🏫

Team Documentation

Share SVG diagrams in pull requests or technical docs to explain regex logic.

📋

API Spec Diagrams

Embed SVG diagrams in specification documents for clarity.

Feedback sturen

Laat ons uw mening weten om ons te helpen de tool te verbeteren.

Disclaimer

De tools op deze site zijn volledig gratis te gebruiken, maar het gebruik is op eigen risico. Wij bieden geen garanties met betrekking tot de nauwkeurigheid, volledigheid of veiligheid van berekeningsresultaten, conversieresultaten of gegenereerde gegevens. Houd er rekening mee dat de beheerder geen verantwoordelijkheid aanvaardt voor eventuele schade of problemen veroorzaakt door het gebruik van deze tools. Bovendien worden bestandsverwerking en berekeningen lokaal in uw browser uitgevoerd, wat betekent dat de door u ingevoerde gegevens niet naar onze servers worden verzonden of daar worden opgeslagen.