✓ Verified 💻 Development ✓ Enhanced Data

Regex Visualizer

Render Regulex-style railroad diagrams for a JavaScript regular expression and export the exact same

Rating
4.7 (301 reviews)
Downloads
1,712 downloads
Version
1.0.0

Overview

Render Regulex-style railroad diagrams for a JavaScript regular expression and export the exact same SVG/PNG.

Complete Documentation

View Source →

Regex Visualizer

Overview

Export the Regulex-Plus web visualizer output to .svg and/or .png in a single command, using the built-in web UI export logic (no re-drawing).

Quick Start

Render both SVG and PNG:

powershell
cd "$env:USERPROFILE\.codex\skills\regex-visualizer"
node scripts/render.mjs `
  --re "hello\\s+world" `
  --flags "i" `
  --out "out/hello-world"

bash
cd ~/.codex/skills/regex-visualizer
node scripts/render.mjs \
  --re 'hello\\s+world' \
  --flags 'i' \
  --out 'out/hello-world'

SVG only:

powershell
cd ~/.codex/skills/regex-visualizer
node scripts/render.mjs `
  --re "^(a|b)*?$" `
  --out "out/re" `
  --svg-only

PNG only:

powershell
cd ~/.codex/skills/regex-visualizer
node scripts/render.mjs `
  --re "^(a|b)*?$" `
  --out "out/re" `
  --png-only

Install Dependencies

This skill uses puppeteer-core (does not bundle Chromium). Install once:

bash
cd ~/.codex/skills/regex-visualizer
npm install

Screenshot

An example export generated using the built-in web UI rendering:

  • assets/example.png
  • assets/example.svg

Behavior

  • Uses assets/regulex.html (a copy of the Regulex-Plus web UI) and loads it with #!cmd=export&flags=...&re=....
  • Waits for the page to produce the exported canvas (canvas.exportCanvas) and then writes:
  • .png from the same canvas as the web UI "Export Image" button
  • .svg from the same element used by the web UI

Notes

  • Flags are limited to what the web UI supports by default: i, m, g.
  • If the regex fails to parse, the script surfaces the same error text shown in the UI.

Resources

scripts/

  • scripts/render.mjs: Headless export to SVG/PNG via the built-in cmd=export mode.

references/

None.

assets/

  • assets/regulex.html: Copy of Regulex-Plus/docs/index.html used for rendering/export.

Installation

Terminal bash

openclaw install regex-visualizer
    
Copied!

💻Code Examples

--png-only

---png-only.txt
## Install Dependencies

This skill uses `puppeteer-core` (does not bundle Chromium). Install once:
example.txt
cd "$env:USERPROFILE\.codex\skills\regex-visualizer"
node scripts/render.mjs `
  --re "hello\\s+world" `
  --flags "i" `
  --out "out/hello-world"
example.sh
cd ~/.codex/skills/regex-visualizer
node scripts/render.mjs \
  --re 'hello\\s+world' \
  --flags 'i' \
  --out 'out/hello-world'
example.txt
cd ~/.codex/skills/regex-visualizer
node scripts/render.mjs `
  --re "^(a|b)*?$" `
  --out "out/re" `
  --svg-only
example.txt
cd ~/.codex/skills/regex-visualizer
node scripts/render.mjs `
  --re "^(a|b)*?$" `
  --out "out/re" `
  --png-only

Tags

#web_and-frontend-development #script

Quick Info

Category Development
Model Claude 3.5
Complexity One-Click
Author pipedream941
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
🧠

Ready to Install?

Get started with this skill in seconds

openclaw install regex-visualizer