Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Ghost RegexNew to Visual Studio Code? Get it now.
Ghost Regex

Ghost Regex

Ghost Regex

| (0) | Free
Work with regular expressions right inside VS Code — Railroad diagrams, Explain, ReDoS detector, Unit tests, and Preview on real files.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Ghost Regex

Work with regular expressions right inside VS Code. No browser tabs, no copy-paste, no surprises in production.

Railroad diagrams, Explain with AST tree, ReDoS detector with auto-fix, Unit tests, and Preview on real files — all in one extension. Works fully offline.


What it does

📊 Railroad diagram

Every token — visualized. Anchors in green, groups in purple, quantifiers in orange. Hover for tooltips with explanations. Export to SVG with one click.

Railroad diagram

🌳 Explain and AST tree

Parses regex into 100+ token types. Clear nesting structure — groups, quantifiers, lookaround. You see what the pattern actually does.

🛡️ ReDoS detector with auto-fix

Finds nested quantifiers before they become a problem. Shows vulnerability level (low / high / critical). Suggests a fixed pattern in one click.

ReDoS warning

🔍 Preview on real files

Pick a file — the extension highlights matches right in the content. Not in a sandbox, not on made-up strings. On real data.

✅ Unit tests for regex

Save test strings with expected results — run the pattern against the whole set with one button. Failed — you'll see a red ✗ on that specific test.

🔄 Convert to 5 languages

One regex — code for Python, JavaScript, Go, Rust, Java. With proper escaping.

⚡ 94 snippets

Email, URL, IPv4, UUID, JWT, dates, passwords — 8 categories of ready-made patterns. Paste and go.

Snippets

↩️ Sync Back

Right-click on regex in code → "Explain selection" → edit in panel → "Apply to editor". All in one place.


Keyboard shortcuts

  • Ctrl+Alt+R — open Ghost Regex panel
  • Ctrl+Alt+E — explain selected regex (or right-click in code)

Free vs Pro

Free — full-featured tool, not a demo:

  • Railroad diagram
  • Explain + AST tree
  • ReDoS detector
  • Convert to Python and JavaScript
  • 3 snippets (Email, URL, IPv4)
  • Live test with flags
  • Dialects: JavaScript, Python

Pro — $6/month:

  • Preview on real files
  • All 94 snippets
  • Convert to Go, Rust, Java
  • Dialects: Go, Rust, Java, PCRE
  • Sync Back
  • Export diagrams to SVG
  • Unit tests for regex

Get Pro on Boosty


Privacy

Everything runs locally inside VS Code. Preview reads files from your disk. ReDoS analysis runs on your machine. No server requests, no telemetry, no accounts.

Your patterns stay yours.


Requirements

  • VS Code 1.138.0 or higher
  • Node.js 18+ (only for development)

Feedback

Found a bug or have an idea? Open an issue or use the feedback form on our landing page.


License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft