Regex Tester
A Regex Tester evaluates a regular expression against a sample string in real time, highlighting every match and capture group, all using the browser's native RegExp engine so your pattern and test data never leave the page.
Enter a pattern and a test string.About Regex Tester
Type a pattern in the slash-delimited box, set flags (g, i, m, s, u, y) with toggle buttons, and paste a test string. Matches are highlighted inline and listed with their index and any capture groups in a table. The tester also surfaces the SyntaxError message verbatim when a pattern is invalid so you can fix it immediately.
What Regex Tester does
- Real-time match highlighting against your test input
- All ECMAScript flags exposed as toggle buttons (g, i, m, s, u, y)
- Capture groups and named groups listed in a sortable table
- Surfaces SyntaxError messages verbatim for broken patterns
- Debounced input for smooth typing on megabyte-scale test strings
When to reach for Regex Tester
- Authoring a validation regex for a form field
- Extracting structured data out of log lines
- Debugging why a production regex never matches
- Translating a regex you found in a Stack Overflow answer into something you understand
How to use Regex Tester
- 01
Enter your pattern
Type the regex between the slashes. Toggle any flags (g, i, m, s, u, y) as needed.
- 02
Paste a test string
Paste any text into the test input — matches highlight live as you type.
- 03
Inspect captures
Each match and its capture groups appear in a table you can copy individually or all at once.
When to use Regex Tester vs alternatives
| Alternative | Use Regex Tester when… | Use the alternative when… |
|---|---|---|
| regex101.com | you want a pattern tested 100% locally with no third-party logging. | you need PCRE / Python / Go regex flavors or detailed step-by-step explanations. |
| Browser console RegExp | you want match highlighting and capture-group tables for free. | you only need to test one or two simple patterns. |
Frequently asked questions
Which regex flavor does this support?
Does it work with very long input?
How do I match across newlines?
Can I copy the matches?
Related tools
Related reading
Privacy · 12 min read
Which AI coding tools train on your code? A 2026 privacy guide
Whether an AI coding assistant trains on your code or keeps it private usually comes down to one thing: your subscription tier, not the tool. Here's a current, tier-by-tier breakdown of what GitHub Copilot, Cursor, Claude Code, ChatGPT and Gemini actually do with the code you send them — how to lock each one down, and when the only real guarantee is a local model.
Security · 10 min read
Vibe coding safely: shipping an AI-built app without leaking secrets or bugs
Vibe coding — describing what you want and letting an AI write most of the code — is a genuinely fast way to build. It is also a fast way to leak API keys, install a hallucinated package, and ship an app you do not understand well enough to secure. Here is a practical threat model and a safe workflow that keeps the speed without the accidents.