Skip to content
Limited Edition DevTools

Regex-LE

Find every regex in a codebase, and report which can be driven into catastrophic backtracking

FreeOpen sourceMITNo network access

No editor in the loop? npx -y regex-le-mcp runs the same engine as an MCP server, so an agent can call extract_patterns with nothing else installed, and cargo install regex-le puts the same check in a terminal. Every way to install it.

Overview

What Regex-LE does

A regular expression is easy to write and hard to trust. Regex-LE finds every pattern in the current file, a folder or the whole workspace, runs one against the document to show real matches with line and column positions and capture groups, and screens each pattern for the shapes that cause catastrophic backtracking. Three jobs: extract, test, validate.

What people use it for

  • Extract

    List every regex pattern found in the document: literals, and RegExp constructors built from strings, template literals or String.raw.

  • Test

    Run a found — or manually entered — pattern against the file and see matches with positions and named capture groups.

  • Validate

    Check every pattern for syntax errors and screen it for ReDoS-prone shapes before it reaches production.

Palette

9 commands

Open the command palette and type the name. Nothing is bound to a shortcut by default — the editor's keymap is the user's, not ours.

regex-le.showPositions: Show the line and column of each pattern and match. On by default.

  • Test Regexregex-le.test
  • Extract Patternsregex-le.extract
  • Extract Patterns from Workspaceregex-le.extractWorkspace
  • Extract Patterns from Folderregex-le.extractFolder
  • Validate Regexregex-le.validate
  • Validate Patterns in Workspaceregex-le.validateWorkspace
  • Validate Patterns in Folderregex-le.validateFolder
  • Open Settingsregex-le.openSettings
  • Help & Troubleshootingregex-le.help

Install

Install Regex-LE

VS Code

ext install nolindnaidoo.regex-le

Open Quick Open (Cmd/Ctrl+P) and paste.

Cursor / Windsurf

cursor --install-extension nolindnaidoo.regex-le

Cursor, Windsurf, VSCodium and the other VS Code forks pull from Open VSX. The id is the same as on the Marketplace.

AI agents

npx -y regex-le-mcp

Runs Regex-LE's engine as an MCP server, so an agent can call extract_patterns with no editor involved. VS Code 1.101+ needs nothing — the extension registers it for you.

Channels

Where it ships

One engine, 5 places to get it. Copy the one for the editor you use.

Links

Where Regex-LE lives

The family

The other 16