Regex Tester - Live Matches, Groups and Highlights
Regular expressions are write-once, puzzle-over-forever. Paste a pattern and some sample text below and see exactly what matches, where, and what each capture group caught - before the pattern ever reaches your code.
How to use the Regex Tester
- Type your pattern in the Pattern box (without the surrounding slashes).
- Set flags such as g (global), i (ignore case) or m (multiline) in the Flags box.
- Type or paste the test text - results update live as you type.
- Read the highlighted text and the match table: every match with its position and capture groups.
How it works
The tool builds a JavaScript RegExp from your pattern and flags and executes it against the test text. With the global flag set it walks through every match in order; without it, it reports the first match only, exactly like your own code would. Zero-width matches (for example from x*) are handled safely - the walker advances one character after each empty match so it can never loop forever. The highlight view escapes your text to safe HTML first, then wraps each match in a highlight marker, so what you see is precisely what matched.
Worked example
The pattern (\d{4})-(\d{2})-(\d{2}) against "Release on 2026-11-08, hotfix on 2026-11-09" finds 2 matches, and the table shows group 1 = 2026, group 2 = 11, group 3 = 08 for the first - ready to reuse in a date parser.
Frequently Asked Questions
Is this regex tester free?
Yes - completely free, with no sign-up and no daily cap.
Which regex flavor does it use?
JavaScript regular expressions - the flavor used by browsers and Node.js. Most patterns from other flavors (PCRE, Python) work the same, but a few constructs differ, such as named groups which JavaScript writes as (?<name>...).
Why do I only see one match?
Without the g flag a regex stops at the first match. Add g in the Flags box to find them all.
What are capture groups?
Each pair of parentheses in your pattern captures the text it matched. The table lists them per match - group 1 is the first opening parenthesis, and so on. Groups written (?:...) do not capture.
Is my text uploaded to a server?
No. The pattern runs 100% in your browser against text that never leaves your device.
Related Developer Tools
JavaScript Minifier
Conservatively minify JavaScript - comments and dead whitespace removed, strings and regex kept intact.
URL Encoder & Decoder
Percent-encode text and URLs safely, with a per-character breakdown table.
JSON Formatter
Validate, pretty-print and minify JSON, with the exact position of any error.