Interactive, real-time Regular Expression (RegEx) simulator and visualizer built right into VS Code. No more context switching to browser-based tools like regex101 or RegExr. Test and build your regular expressions instantly, directly inside your code.

⚡ Features
- Inline Auto-Detection: Instantly recognizes regular expression definitions (JS/TS literals, JS
new RegExpobjects, Pythonre.compile, and Goregexp.Compile) in your codebase. - Visual Hover Explanations: Hovering your cursor over a detected RegEx displays a clean, english breakdown of its key components and a click action to test it.
- CodeLens Triggers: Displays a subtle
⚡ Live Testindicator above matches to quickly pop open the simulator in a split panel beside your code. - Vibrant Interactive Webview:
- Live Testing: Type sample text in the editor and watch matches highlight instantly with color-coded identifiers.
- Interactive Token Explainer: Character-by-character syntax parsing explaining exactly what anchors, character sets, groups, and quantifiers are matching.
- Capture Groups: Real-time listing of match indexes and contents of capturing groups.
- Quick Templates (RegEx Builder): One-click injection of common regular expressions (Email, URL, IP Address, Phone, Secure Password, and Dates).
- Operators Reference: Insert common regex characters at your cursor in one click.
- Sync Back to Editor: Tweak and refine your regex inside the simulator, then click
⚡ Apply to Editorto write the updated expression directly back into your code, formatting it exactly to your original programming language's specification.
🚀 How to Use
- Place your cursor over any regular expression in your code (e.g.
/^[a-zA-Z]+$/gi). - Click the
⚡ Live TestCodeLens appearing above the expression, or hover your cursor and click⚡ Live Test in Lensin the tooltip. - The simulator will slide open on the right side.
- Type sample strings inside the Test String card to watch regular expressions highlight matching sections dynamically.
- Click Apply to Editor once you've adjusted the expression to save changes back to your source file.
🛠️ Configuration Settings
Customize how RegEx Live Lens behaves inside your VS Code environment:
regex-live-lens.enableHover: Enable or disable the interactive RegEx hover tooltips (Default:true).regex-live-lens.enableCodeLens: Enable or disable the⚡ Live TestCodeLens overlays (Default:true).
📦 Requirements
- VS Code version
1.80.0or higher.
Enjoy clean regex writing without leaving your editor! 🚀