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. |