Zero-Hassle Regex Extraction & Validation - Test, extract, and validate regular expressions directly inside VS Code with real-time match previews, performance scoring, and built-in ReDoS detection.
- π Test Regex Patterns - Test patterns against your code with detailed match information
- π€ Extract Matches - Extract all matches from any file with one command
- β Validate Patterns - Check regex validity and detect ReDoS vulnerabilities
- π Performance Scoring - Get performance metrics and optimization suggestions
- π‘οΈ ReDoS Detection - Built-in protection against Regular Expression Denial of Service attacks
- π Zero-Hassle Guarantee - Works reliably on all text files with automatic safety checks
- Open a file in VS Code (any text file works!)
- Press
Ctrl+Alt+R(orCmd+Alt+Ron Mac) or search for "Regex-LE: Test Regex" - Enter your pattern (e.g.,
/\\d+/to find numbers) - View results with matches, positions, and performance metrics
Test a regex pattern against the active editor content with detailed results.
Usage: Ctrl+Alt+R / Cmd+Alt+R or Command Palette β "Regex-LE: Test Regex"
Features:
- Interactive flag selection (global, case-insensitive, multiline, etc.)
- Line and column position for each match
- ReDoS vulnerability warnings
- Performance scoring and metrics
- Markdown-formatted results report
Extract all matches from the active file and display them as a list.
Usage: Command Palette β "Regex-LE: Extract Matches"
Features:
- Automatic global flag for extraction
- Clipboard integration (if enabled)
- Side-by-side results view
- Progress indication for large files
Validate a regex pattern and check for security issues.
Usage: Command Palette β "Regex-LE: Validate Regex"
Features:
- Pattern syntax validation
- ReDoS vulnerability detection
- Performance score calculation
- Security recommendations
- Export Settings - Save your configuration to a JSON file
- Import Settings - Restore settings from a previously exported file
- Reset Settings - Reset all settings to defaults
Regex-LE works universally on any text file! Unlike format-specific extractors that require parsers, regex operates directly on text content, making it truly universal.
Programming Languages
- JavaScript/TypeScript (
.js,.ts,.jsx,.tsx,.mjs,.cjs) - Python (
.py,.pyw,.pyi) - Ruby (
.rb,.rake) - Go (
.go) - Rust (
.rs) - Java (
.java) - C/C++ (
.c,.cpp,.h,.hpp) - C# (
.cs) - PHP (
.php) - Swift (
.swift) - Kotlin (
.kt) - And any other programming language
Data Formats
- JSON (
.json) - YAML (
.yaml,.yml) - TOML (
.toml) - XML (
.xml,.xhtml) - CSV (
.csv)
Web Technologies
- HTML (
.html,.htm) - CSS (
.css,.scss,.less,.sass)
Configuration Files
- Environment (
.env,.env.local,.env.production) - INI (
.ini,.cfg,.conf) - Config files (
.config,.conf)
Documentation & Text
- Markdown (
.md,.markdown) - Plain Text (
.txt) - Log Files (
.log) - README files
- Documentation (
.rst,.tex,.org)
Shell & Scripts
- Shell/Bash (
.sh,.bash,.zsh) - PowerShell (
.ps1) - Batch (
.bat,.cmd)
Regex-LE applies patterns directly to text contentβno format parsing required. This means:
β
Works on any text file VS Code can open
β
No format-specific limitations
β
Safety checks handle edge cases (binary detection, size limits)
β
Reliable results guaranteed by Zero-Hassle design
Regex-LE automatically protects you:
- π‘οΈ Binary file detection - 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
JavaScript/TypeScript - Extract function names:
// Pattern: /\bfunction\s+(\w+)/g
// Matches: function declarationsJSON - Extract all string values:
// Pattern: "([^"]+)"
// Matches: All JSON string valuesHTML - Extract all URLs:
<!-- Pattern: https?://[^\s"<>]+ -->
<!-- Matches: All HTTP/HTTPS URLs -->CSV - Extract email addresses:
// Pattern: [\w.-]+@[\w.-]+\.\w+
// Matches: Email addresses in any column
Log Files - Extract timestamps:
// Pattern: \d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}
// Matches: ISO 8601 timestamps
Regex-LE has minimal configuration to keep things simple. Most settings are available in VS Code's settings UI under "Regex-LE".
regex.realtimePreviewEnabled- Enable real-time regex preview (future feature)regex.redosDetectionEnabled- Enable ReDoS vulnerability detectionregex.maxMatchLimit- Maximum matches to return (default: 1000)copyToClipboardEnabled- Auto-copy extraction resultsopenResultsSideBySide- Open results side-by-sidenotificationsLevel- Control notification verbosity (all, important, silent)safety.enabled- Enable safety checks for large filesperformance.enabled- Enable performance monitoring
For the complete list, open VS Code Settings and search for "regex-le".
- Export - Save your configuration to share or backup
- Import - Restore settings from a file
- Reset - Restore all settings to defaults
All settings files are validated for security and safety.
13 languages: English, German, Spanish, French, Indonesian, Italian, Japanese, Korean, Portuguese (Brazil), Russian, Ukrainian, Vietnamese, Chinese (Simplified)
- VS Code: 1.70.0 or higher
- Platform: Windows, macOS, Linux
- Node.js: 20.0.0+ (bundled with VS Code)
- 100% local processing - No data leaves your machine
- No network requests - Everything runs locally
- Optional telemetry - Local-only logging when enabled
- Secure settings import - Validated against schema to prevent malicious configurations
- ReDoS protection - Built-in vulnerability detection
Regex-LE is designed to "just work" without complications:
β
Universal text support - Works on any file VS Code can open as text
β
Automatic safety checks - Binary files, size limits handled automatically
β
Graceful error handling - Clear messages, not cryptic errors
β
Performance protection - Match limits prevent resource exhaustion
β
ReDoS awareness - Warns about vulnerable patterns before execution
Unlike format-specific extractors (which require parsers for each file type), regex operates on raw textβmaking it truly universal while maintaining reliability.
| Feature | Regex-LE | Paths-LE | Secrets-LE |
|---|---|---|---|
| File Type Support | β Any text file | ||
| Format Parsing | β Not needed | β Required | β Regex-based |
| Zero-Hassle | β Universal | β Works on text | |
| Custom Patterns | β User-defined | β Fixed patterns |
Key Insight: Regex-LE offers maximum flexibilityβyou define the pattern, and it works universally.
- Performance Guide - Learn about regex performance optimization
- ReDoS Detection - Understanding Regular Expression Denial of Service
- File Type Analysis - See docs/FILE_TYPE_ANALYSIS.md for detailed file type support analysis
We welcome contributions! Please see our Contributing Guidelines for details.
MIT License - See LICENSE file for details.
Built with patterns from the LE extension family:
- Paths-LE, Secrets-LE, Numbers-LE, Dates-LE, URLs-LE, Strings-LE, EnvSync-LE, Scrape-LE
- GitHub Issues: Report a bug or request a feature
- Documentation: See the
docs/directory for detailed guides
Made with β€οΈ by OffensiveEdge