Regex Tester & Live Preview
Build and debug regular expressions with instant, side-by-side highlighting. Hover any match to link the code and the preview, switch between JavaScript, PCRE, Python and more, and get a plain-English explanation — all in your browser.
Overview
This regex tester turns writing regular expressions into something you can actually see. As you type, your test text highlights every match in real time, with capture groups underlined and a live count. The signature two-way hover link connects the code and the preview: hover a match in the text and its result card is emphasized, hover a card and the editor scrolls to that match — so even patterns with dozens of matches stay easy to follow. A syntax-highlighted pattern editor, one-tap flag toggles, and a plain-English explanation panel make it approachable, while Match, Replace and Split modes cover real debugging work. Patterns run on your browser's native engine, with a translation layer that brings PCRE, Python, .NET, Java, Ruby and Go syntax to life and flags anything it can't represent. Save patterns locally, share a link, or copy the literal — all privately, and all offline once the page has loaded.
Key Features
- Live side-by-side highlighting that updates as you type
- Two-way hover linking — hover a match in the text and its result card lights up, and vice versa
- Full syntax highlighting inside the pattern editor
- Match, Replace and Split operations with capture-group inspection
- Named and numbered capture groups with exact positions
- Plain-English explanation of your pattern, token by token
- Multiple flavors: JavaScript, PCRE, Python, .NET, Java, Ruby and Go
- Every flag — g, i, m, s, u, y — as a one-tap toggle with inline help
- Curated examples for emails, URLs, IPs, dates, logs and more
- Save patterns locally, share a link, or copy the /pattern/flags literal
- Works fully offline and adapts to light and dark mode
Common Use Cases
- Debug a Stubborn Pattern — Developers building validation or parsing logic watch exactly what matches and what doesn't, with group positions and a plain-English breakdown to pinpoint the problem.
- Learn Regular Expressions — Students and newcomers experiment with live highlighting, an explanation panel, and a built-in cheat sheet, turning an intimidating syntax into something visual and immediate.
- Craft Find-and-Replace Rules — Anyone cleaning up text or code previews substitutions with $1 and named-group references before applying them in their editor or codebase.
- Port Patterns Between Languages — Teams moving a regex from Python or PCRE to JavaScript see how the syntax translates and which constructs need attention, all in one place.
- Validate and Extract Data — Analysts test patterns for emails, URLs, IP addresses, dates, and log lines against real samples, then copy the working pattern with confidence.
How It Works
Write your pattern
Type a regular expression in the syntax-highlighted editor and toggle flags like g, i and m. A friendly error appears the moment something is off.
See matches highlight live
Your test text highlights every match instantly, with capture groups underlined. Hover a highlight and the matching result card lights up — hover a card and it jumps to the text.
Match, replace or split
Switch operations to preview a substitution with $1 and $<name> references, or see exactly how the pattern splits your input.
Understand and reuse
Open the explanation panel for a plain-English breakdown, save patterns locally, or copy a shareable link — all without anything leaving your browser.