Regex Tester
Test JavaScript regex patterns with live highlighting and capture group breakdown. Toggle global, case-insensitive, and multiline flags. Browser-based.
tuneFlags
infoMatch Summary
lightbulbQuick Reference
- . — Any character
- \d — Digit [0-9]
- \w — Word character
- \s — Whitespace
- ^ — Start of string
- $ — End of string
- * — 0 or more
- + — 1 or more
- ? — 0 or 1
What is the Regex Tester?
A regex tester lets you write a pattern and see exactly which parts of a test string it matches, without running your application. Capture groups, flag effects, and match positions all show up live, which turns the usual write-run-debug loop into a single feedback cycle measured in keystrokes.
How to use the Regex Tester
- 1
Type a pattern
Drop your regex into the top field. The slashes and flag suffix are added automatically, so just enter the pattern body.
- 2
Paste your test string
Put the text you want to match against into the test string box. Matches highlight as you type.
- 3
Toggle flags
Global (g) finds every match, case-insensitive (i) ignores letter case, multiline (m) makes ^ and $ work per-line.
- 4
Inspect capture groups
Each parenthesized group in your pattern shows up as a separate captured value beneath the match. Use this to confirm your groups grab what you expect.
Frequently Asked Questions
What regex flags are supported?
The toggleable ones are global (g), case-insensitive (i), and multiline (m). Under the hood the matcher is the browser's native RegExp engine, so any flag JavaScript supports (including s, u, y) works if you write it manually into a pattern delimiter.
Does it show capture groups?
Every parenthesized group in your pattern shows up as a numbered Group N below the match it belongs to. Nested groups are listed in the order JavaScript reports them, left-to-right by opening paren position.
Is my regex data private?
All matching runs against the browser's native RegExp engine, in your tab. Patterns and test strings stay local. That makes the tool safe for testing patterns against real log lines, internal IDs, or anything else you wouldn't want pasted into a third-party server.