Test, extract, and validate regular expressions directly inside VS Code
Automatic pattern detection • Performance scoring • Built-in ReDoS detection
Before: Manually finding and testing regex patterns (10+ minutes)
const pattern1 = /\d+/g;
const pattern2 = new RegExp("\\w+", "i");
// ... searching through files to find all regex patternsAfter: One command extracts all patterns automatically
/\d+/g
/\w+/i
/[a-z]+/g
... (12 patterns total)
- Automatic pattern extraction - Finds all regex patterns in your code automatically
- Zero Config - Install → Press Extract → Done
- ReDoS Protection - Built-in vulnerability detection before execution
- Performance Scoring - Get metrics and optimization recommendations
Perfect for testing patterns, extracting data, and validating regex security.
If Regex-LE saves you time, a quick rating helps other developers discover it:
⭐ Open VSX • VS Code Marketplace
- Extract Regex Patterns - Automatically finds all regex patterns in your file (no prompts!)
- Test Patterns - Test extracted patterns against file content with detailed results
- Validate Patterns - Validate all patterns and detect ReDoS vulnerabilities automatically
- Performance Scoring - Get metrics and optimization suggestions
- ReDoS Detection - Protection against Regular Expression Denial of Service
- Universal Support - Works on any text file format
- 13 languages - English, Chinese, German, Spanish, French, Indonesian, Italian, Japanese, Korean, Portuguese, Russian, Ukrainian, Vietnamese
- String-LE - Extract user-visible strings for i18n and validation • VS Code Marketplace
- Numbers-LE - Extract and analyze numeric data with statistics • VS Code Marketplace
- EnvSync-LE - Keep .env files in sync with visual diffs • VS Code Marketplace
- Paths-LE - Extract file paths from imports and dependencies • VS Code Marketplace
- Secrets-LE - Detect and sanitize secrets before you commit • VS Code Marketplace
- Scrape-LE - Validate scraper targets before debugging • VS Code Marketplace
- Colors-LE - Extract and analyze colors from stylesheets • VS Code Marketplace
- URLs-LE - Extract URLs from any codebase with precision • VS Code Marketplace
- Dates-LE - Extract temporal data from logs and APIs • VS Code Marketplace
- Pattern Discovery - Find all regex patterns in your codebase automatically
- Pattern Testing - Test extracted patterns against file content with detailed results
- Security Validation - Detect ReDoS vulnerabilities before deployment
- Performance Optimization - Get actionable recommendations for slow patterns
Automatically find all regex patterns in your code:
// Your file contains:
const pattern1 = /\d+/g;
const pattern2 = new RegExp('\\w+', 'i');
const pattern3 = /[a-z]+/gm;
// Extract command finds them all automatically:
/\d+/g
/\w+/i
/[a-z]+/gmTest extracted patterns against your file content:
// Extracted pattern: /\d+/g
// Test against: "Call 555-123-4567 or 555-987-6543"
// Results: 2 matches found (555-123-4567, 555-987-6543)
// Performance: Excellent (95/100)Automatically validate all patterns in your file:
// Your file contains:
const valid = /\d+/g; // ✅ Valid, no ReDoS
const vulnerable = /(a+)+b/; // ⚠️ Valid but ReDoS vulnerable
// Validate command checks all:
// Pattern 1: ✅ Valid, No ReDoS
// Pattern 2: ✅ Valid, ⚠️ ReDoS: Critical - Nested quantifiers- Install from Open VSX or VS Code Marketplace
- Open any file with regex patterns (JavaScript, Python, or any text file)
- Run
Regex-LE: Extract Matchesto see all patterns in your file - Use
Test RegexorValidate Regexto test/validate the extracted patterns
Regex-LE provides 5 commands accessible via Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
- Extract Matches - Automatically extracts all regex patterns from current document (no prompts!)
- Test Regex (
Cmd/Ctrl+Alt+R) - Test extracted patterns against file content with detailed results - Validate Pattern - Validates all extracted patterns and checks for ReDoS vulnerabilities
- Open Settings - Quick access to extension settings
- Help & Troubleshooting - Comprehensive in-editor documentation
Regex-LE has minimal configuration to keep things simple. Most settings are available in VS Code's settings UI under "Regex-LE".
Key settings include:
- ReDoS detection enabled/disabled
- Performance scoring enabled/disabled
- Maximum match limits
- Output format preferences (side-by-side, clipboard copy)
- Safety warnings and thresholds
- Notification levels (silent, important, all)
For the complete list of available settings, open VS Code Settings and search for "regex-le".
Regex-LE works universally on any text file! Unlike format-specific extractors that require parsers, regex operates directly on text content.
| Category | File Types |
|---|---|
| Programming | JavaScript, TypeScript, Python, Ruby, Go, Rust, Java, C/C++, C#, PHP, Swift, Kotlin |
| Data Formats | JSON, YAML, TOML, XML, CSV |
| Web | HTML, CSS, SCSS, LESS, Sass |
| Config | .env, .ini, .cfg, .conf |
| Documentation | Markdown, Plain Text, Log Files |
| Shell | Bash, Zsh, PowerShell, Batch |
Regex-LE automatically detects patterns in these formats:
- Literal regex:
/pattern/flags(e.g.,/\d+/g,/[a-z]+/i) - RegExp constructor:
new RegExp('pattern', 'flags') - RegExp calls:
RegExp('pattern', 'flags')
All patterns are extracted automatically—no manual input required!
- Binary file detection - Automatically blocks processing of binary files
- Size limits - Warns before processing very large files
- ReDoS detection - Warns about vulnerable patterns
- Match limits - Prevents excessive memory usage
- Automatic deduplication - Same pattern with same flags shown only once
13 languages: English, German, Spanish, French, Indonesian, Italian, Japanese, Korean, Portuguese (Brazil), Russian, Ukrainian, Vietnamese, Chinese (Simplified)
VS Code 1.70.0+ • Platform Windows, macOS, Linux
Memory 200MB recommended for large files
100% local processing. No data leaves your machine. Optional logging: regex-le.telemetryEnabled
Regex-LE includes built-in performance monitoring and configurable thresholds to help track operation speed and resource usage.
For detailed information, see Performance Monitoring.
No patterns found?
Ensure your file contains regex patterns in formats like /pattern/flags or new RegExp()
Pattern not matching?
Check flags (global, case-insensitive, multiline) and test with simpler patterns first
ReDoS warnings?
Review pattern for nested quantifiers or overlapping alternations
Need help?
Check Issues or enable logging: regex-le.telemetryEnabled: true
What patterns are extracted?
Literal regex (/pattern/flags), new RegExp() calls, and RegExp() function calls
Does it work on large files?
Yes, with automatic safety checks and warnings for files over 1MB
Is ReDoS detection accurate?
It catches common patterns but isn't exhaustive. Always test with realistic data
Can I test custom patterns?
Yes! If no patterns are found in the file, Test/Validate commands will prompt you to enter a pattern manually
How does Extract work?
It automatically scans your file and finds all regex patterns—no prompts, no configuration needed
81 unit tests across 5 test files • Powered by Vitest • Run with bun run test:coverage
No broken or failed tests are allowed in commits. All tests must pass before code can be committed or merged.
- Comprehensive regex validation with edge case coverage
- ReDoS detection tests for common vulnerability patterns
- Performance scoring validation
- Pattern extraction tests for all supported formats
- Error handling with graceful degradation
- Configuration and settings validation
For detailed testing guidelines, see Testing Guidelines.
Copyright © 2025 @OffensiveEdge. All rights reserved.
